From: David Hildenbrand <david@redhat.com>
To: Peter Xu <peterx@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
liubo <liubo254@huawei.com>, Matthew Wilcox <willy@infradead.org>,
Hugh Dickins <hughd@google.com>, Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH v1 0/4] smaps / mm/gup: fix gup_can_follow_protnone fallout
Date: Fri, 28 Jul 2023 21:52:11 +0200 [thread overview]
Message-ID: <aab2cb18-67e1-e55b-57e0-7e0ac90f3da3@redhat.com> (raw)
In-Reply-To: <ZMQZfn/hUURmfqWN@x1n>
On 28.07.23 21:39, Peter Xu wrote:
> Hi, Linus,
>
> On Fri, Jul 28, 2023 at 09:18:45AM -0700, Linus Torvalds wrote:
>> The original reason for FOLL_NUMA simply does not exist any more. We
>> know exactly when a page is marked for NUMA faulting, and we should
>> simply *ignore* it for GUP and follow_page().
>>
>> I think we should treat a NUMA-faulting page as just being present
>> (and not NUMA-fault it).
>
> But then does it means that any gup-only user will have numa balancing
> completely disabled? Since as long as the page will only be accessed by
> GUP, the numa balancing will never trigger anyway.. I think KVM is
> manipulating guest pages just like that. Not sure whether it means it'll
> void the whole numa effort there.
>
> If we allow that GUP from happening (taking protnone as present) I assume
> it'll also stop any further numa balancing on this very page to trigger
> too, because even if some page fault handler triggered on this protnone
> page later that is not GUP anymore, when it wants to migrate the page to
> the other numa node it'll see someone is holding a reference on it already,
> and then we should give up the balancing.
>
> So to me FOLL_NUMA (or any identifier like it.. just to describe the
> caller's need; some may really just want to fetch the pfn/page) still makes
> sense. But maybe I totally misunderstood above..
Yes, I agree, took me a bit longer to realize (being a KVM developer :)
... I'm really ready for the weekend).
So if this series is not acceptable then better revert that commit -- or
let callers like KVM specify FOLL_NUMA.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-07-28 19:52 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 21:28 David Hildenbrand
2023-07-27 21:28 ` [PATCH v1 2/4] mm/gup: Make follow_page() succeed again on PROT_NONE PTEs/PMDs David Hildenbrand
2023-07-28 2:30 ` John Hubbard
2023-07-28 9:08 ` David Hildenbrand
2023-07-28 10:12 ` David Hildenbrand
2023-07-27 21:28 ` [PATCH v1 3/4] smaps: use vm_normal_page_pmd() instead of follow_trans_huge_pmd() David Hildenbrand
2023-07-27 21:28 ` [PATCH v1 4/4] mm/gup: document FOLL_FORCE behavior David Hildenbrand
2023-07-28 16:18 ` [PATCH v1 0/4] smaps / mm/gup: fix gup_can_follow_protnone fallout Linus Torvalds
2023-07-28 17:30 ` David Hildenbrand
2023-07-28 17:54 ` David Hildenbrand
2023-07-28 19:40 ` David Hildenbrand
2023-07-28 19:50 ` Peter Xu
2023-07-28 20:00 ` David Hildenbrand
2023-08-02 10:24 ` Mel Gorman
2023-07-28 19:39 ` Peter Xu
2023-07-28 19:52 ` David Hildenbrand [this message]
2023-07-28 20:23 ` Linus Torvalds
2023-07-28 20:33 ` David Hildenbrand
2023-07-28 20:50 ` Linus Torvalds
2023-07-28 21:02 ` David Hildenbrand
2023-07-28 21:20 ` Peter Xu
2023-07-28 21:31 ` David Hildenbrand
2023-07-28 22:14 ` Jason Gunthorpe
2023-07-31 16:01 ` Peter Xu
2023-07-28 21:32 ` John Hubbard
2023-07-28 21:49 ` Peter Xu
2023-07-28 22:00 ` John Hubbard
2023-07-31 16:05 ` Peter Xu
[not found] ` <412bb30f-0417-802c-3fc4-a4e9d5891c5d@redhat.com>
2023-07-29 9:35 ` David Hildenbrand
2023-07-31 16:10 ` Peter Xu
2023-07-31 16:20 ` David Hildenbrand
2023-07-31 18:23 ` Linus Torvalds
2023-07-31 18:51 ` Peter Xu
2023-07-31 19:00 ` David Hildenbrand
2023-07-31 19:07 ` Linus Torvalds
2023-07-31 19:22 ` David Hildenbrand
2023-08-01 13:05 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aab2cb18-67e1-e55b-57e0-7e0ac90f3da3@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liubo254@huawei.com \
--cc=peterx@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox