Messages in this thread | | | From | Ulrich Drepper <> | Date | Tue, 6 Apr 2010 13:02:28 -0700 | Subject | Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional adaptive spinning |
| |
On Tue, Apr 6, 2010 at 12:31, Thomas Gleixner <tglx@linutronix.de> wrote: > We need to figure out a more efficient way to > do the spinning in the kernel where we have all the necessary > information already.
Really? The owner information isn't in general available in the kernel. Futex operation doesn't require the value used to be the PID (or negative of the PID). That is a dramatic limitation of the usefulness of futexes.
At userlevel there is access to other fields of the data structure which can contain the owner information.
I would like to see the method using a per-thread pinned page and an update of a memory location on scheduling. For benchmarking at least. I agree that a sys_yield_to() syscall would be at the very least useful as well. But it's useful for other things already.
| |