[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4b5rvoi6w6nhiihmog6xjftoveohd47oooodekqedo5qhflmrt@jemw5ss5xps3>
Date: Sat, 13 May 2023 13:10:56 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Matthew Wilcox <willy@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Darren Hart <dvhart@...radead.org>,
Andr� Almeida <andrealmeid@...lia.com>,
linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>,
linux-mm@...ck.org
Subject: Re: Futexes & Folios
On Sat, 13 May 2023, Matthew Wilcox wrote:
>Here's a patch which converts the futex code from using pages to using
>folios. I do have some questions.
>
> - I assume we really do want to base the key on the page offset of the
> futex in the file. That is, it's not good enough to base the key
> on the folio's index because the folio can be split after setting up
> the key, and if it is we'd then fail to find the futex later.
> - In hugetlbfs, it doesn't matter whether the pgoff is based on base
> pages or huge page size -- as long as it's consistent between
> invocations, everything will work
As tglx already mentioned, yes to both.
>(I have ideas about a get_user_folio() but those are not represented in
>this patch)
Btw, regarding some of the concerns about the gup overhead for futexes
in the physr discussion at lsfmm; 'perf bench futex hash' would be a good
way of measuring any impact at a micro level and going from there. This
is only necessary of course for shared futexes, fast/private ones just
use the address space.
Thanks,
Davidlohr
Powered by blists - more mailing lists