Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional adaptivespinning
From: Darren Hart
Date: Wed Apr 07 2010 - 23:41:41 EST
drepper@xxxxxxxxx wrote:
On Tue, Apr 6, 2010 at 16:16, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
I know that you can do any weird stuff with the futex value, but I
don't see the "dramatic" limitation. Care to elaborate ?
If we have to fill in the PID we can represent only three states in a
futex: 0, PID, -PID. Today we can represent 2^32 states. Quite a
difference.
For general futexes sure, but not for robust or PI mutexes. Having
adaptive futexes be based on the TID|WAITERS_FLAG policy certainly isn't
breaking new ground, and is consistent with the other kernel-side futex
locking implementations.
However, I agree that a FUTEX_SET_WAIT_ADAPTIVE sort of call might be
very powerful. However, that might be just academic until I can show an
improvement with adaptive futexes.
The per thread pinned page would be unconditional, right ?
Only if the process would be using these adaptive mutexes. It could be
conditional.
What about the concern of this TLS approach only working for process
private locks? I would very much like to make this work for both shared
and private locks.
Thanks,
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
--
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/