Re: [RFC patch 0/5] futex: Allow lockless empty check of hashbucketplist in futex_wake()

From: Ingo Molnar
Date: Mon Dec 02 2013 - 07:36:15 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Sun, Dec 1, 2013 at 8:55 AM, Ingo Molnar <mingo@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/