lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 May 2007 09:55:03 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	"Ulrich Drepper" <drepper@...il.com>
Cc:	"Davi Arnaut" <davi@...ent.com.br>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Davide Libenzi" <davidel@...ilserver.org>,
	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 14/22] pollfs: pollable futex

On Wed, 2 May 2007 00:40:17 -0700
"Ulrich Drepper" <drepper@...il.com> wrote:

> - if you have multiple threads polling a futex and the waker wakes up
> one, what happens?
>   It is simply not acceptable to have more than one thread return from
> the poll() call, this
>   would waste too many cycles, just to put all threads but one back to sleep.
>

Well, poll() level edge semantic is well defined, you cannot cheat or change it.

If many threads call poll() on the same end point, they should *all* return POLLIN/whatever status.

This is why programs usually use one thread to dispatch events to workers, or at least dont queue XXXX threads calling poll() on one fd.

Only system calls that actually returns an 'work_done' can avoid waking all waiting threads and putting them back in queue. Example of such system calls are accept() or read()

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ