From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B282C433DF for ; Tue, 23 Jun 2020 11:40:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C927A20724 for ; Tue, 23 Jun 2020 11:40:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C927A20724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 50AB06B0002; Tue, 23 Jun 2020 07:40:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 494D76B0005; Tue, 23 Jun 2020 07:40:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 382366B0006; Tue, 23 Jun 2020 07:40:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 1DE7A6B0002 for ; Tue, 23 Jun 2020 07:40:23 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C89AB2C88 for ; Tue, 23 Jun 2020 11:40:22 +0000 (UTC) X-FDA: 76960283484.22.cap74_0a01cc926e3b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 9126818038E67 for ; Tue, 23 Jun 2020 11:40:22 +0000 (UTC) X-HE-Tag: cap74_0a01cc926e3b X-Filterd-Recvd-Size: 1971 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 23 Jun 2020 11:40:21 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id E0B8668AEF; Tue, 23 Jun 2020 13:40:18 +0200 (CEST) Date: Tue, 23 Jun 2020 13:40:18 +0200 From: Christoph Hellwig To: Ralph Campbell Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , Andrew Morton Subject: Re: [RESEND PATCH] mm: fix migrate_vma_setup() src_owner and normal pages Message-ID: <20200623114018.GA17496@lst.de> References: <20200622222008.9971-1-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622222008.9971-1-rcampbell@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 9126818038E67 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 22, 2020 at 03:20:08PM -0700, Ralph Campbell wrote: > The caller of migrate_vma_setup() does not know what type of page is > stored in the CPU's page tables. Pages within the specified range are > free to be swapped out, migrated, or freed until after migrate_vma_setup() > returns. The caller needs to set struct migrate_vma.src_owner in case a > page is a ZONE device private page that the device owns and might want to > migrate. However, the current code skips normal anonymous pages if > src_owner is set, thus preventing those pages from being migrated. > Remove the src_owner check for normal pages since src_owner only applies > to device private pages and allow a range of normal and device private > pages to be migrated. src_owner being set means we want to migrate from device private memory to normal host DRAM. What kind of problem do you see of not touching already present pages in that path?