Re: [PATCH v1 0/4] smaps / mm/gup: fix gup_can_follow_protnone fallout

From: David Hildenbrand
Date: Mon Jul 31 2023 - 15:23:39 EST


On 31.07.23 21:07, Linus Torvalds wrote:
On Mon, 31 Jul 2023 at 12:00, David Hildenbrand <david@xxxxxxxxxx> wrote:

So in the "!writable" case, we would always call
get_user_pages_unlocked() and never honor NUMA faults.

Ok, so kvm doesn't just use the fast version. Oh well. It was an idea..

Certainly an interesting one, thanks for thinking about possible alternatives! Unfortunately, KVM is an advanced GUP user to managed secondary MMUs.

I'll get the FOLL_HONOR_NUMA_FAULT patches ready tomorrow and we can discuss if that looks better.

(btw, the whole reasoning about "HW would refuse to use these pages" was exactly the whole reason I went into the FOLL_FORCE direction ... but it's really better to make FOLL_FORCE deal with VMA protection only)

--
Cheers,

David / dhildenb