On Thu, 16 Feb 2006, Ingo Molnar wrote:
> [...]
>
> > I am ofcourse comparing to a solution where you do a syscall on
> > everytime you do a lock. What I am asking about is whethere it
> > wouldn't be enough to maintain the list at the FUTEX_WAIT/FUTEX_WAKE
> > operation - i.e. the slow path where you have to go into the kernel.
>
> no, that's not enough at all: we need to be able to clean up after
> futexes even if the kernel was _never involved_ with them. The pure
> userspace futex fastpath still can keep a lock stuck! In fact that is
> the common-case.
>
As I understand the protocol the userspace task writes it's pid into the
lock atomically when locking it and erases it atomically when it leaves
the lock. If it is killed inbetween the pid is still there.
Now if another task comes along it reads the pid, sets the wait flag and goes
into the kernel. The kernel will now be able to see that the pid is no
longer valid and therefore the owner must be dead.
Esben
> Ingo
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]