Messages in this thread | | | Date | Wed, 07 Apr 2010 08:33:19 +0300 | From | Avi Kivity <> | Subject | Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional adaptive spinning |
| |
On 04/06/2010 10:31 PM, Thomas Gleixner wrote: > >> That gives you something along the lines of >> >> runaddr = find_run_flag(lock); >> do { >> while(*runaddr == RUNNING) { >> if (trylock(lock)) >> return WHOOPEE; >> cpu relax >> } >> yield (_on(thread)); >> > That would require a new yield_to_target() syscall, which either > blocks the caller when the target thread is not runnable or returns an > error code which signals to go into the slow path. >
Note, directed yield is something that kvm wants for its own ends. As an internal kernel api, not a syscall, but it's apparently useful.
-- Do not meddle in the internals of kernels, for they are subtle and quick to panic.
| |