[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618121928.36287-1-lizhe.67@bytedance.com>
Date: Wed, 18 Jun 2025 20:19:28 +0800
From: lizhe.67@...edance.com
To: jgg@...pe.ca,
david@...hat.com
Cc: akpm@...ux-foundation.org,
alex.williamson@...hat.com,
kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
lizhe.67@...edance.com,
peterx@...hat.com
Subject: Re: [PATCH v4 2/3] gup: introduce unpin_user_folio_dirty_locked()
On Wed, 18 Jun 2025 08:56:22 -0300, jgg@...pe.ca wrote:
> On Wed, Jun 18, 2025 at 01:52:37PM +0200, David Hildenbrand wrote:
>
> > I thought we also wanted to optimize out the
> > is_invalid_reserved_pfn() check for each subpage of a folio.
Yes, that is an important aspect of our optimization.
> VFIO keeps a tracking structure for the ranges, you can record there
> if a reserved PFN was ever placed into this range and skip the check
> entirely.
>
> It would be very rare for reserved PFNs and non reserved will to be
> mixed within the same range, userspace could cause this but nothing
> should.
Yes, but it seems we don't have a very straightforward interface to
obtain the reserved attribute of this large range of pfns. Moreover,
this implies that we need to move the logic of the
is_invalid_reserved_pfn() check to another process. I'm not sure if
this is necessary.
Thanks,
Zhe
Powered by blists - more mailing lists