Messages in this thread | | | Date | Mon, 2 Dec 2013 13:35:59 +0100 | From | Ingo Molnar <> | Subject | Re: [RFC patch 0/5] futex: Allow lockless empty check of hashbucket plist in futex_wake() |
| |
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Sun, Dec 1, 2013 at 8:55 AM, Ingo Molnar <mingo@kernel.org> wrote: > > > > Keeping the page invariant would bring significant performance > > advantages to hashing. > > Or not. Rather, it would make things much worse. The virtual address > is much simpler and better to avoid needing any page table lookup > etc crap. The key is just the mm and the virtual address, and no > silly page table walks etc necessary.
In theory the CPU could give us the phyisical page address, as the TLB is already there: for most futex ops when the kernel runs we just attempted access of the virtual address on the user-space side, so the hardware already did the hard work of looking up everything in the page tables and has it cached most likely.
But yeah, you are right :-/
Thanks,
ngo
| |