diff options
| author | Eric Dumazet <[email protected]> | 2009-06-16 15:33:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-06-16 19:47:48 -0700 |
| commit | 4938d7e0233a455f04507bac81d0886c71529537 (patch) | |
| tree | 6e0c6f0e8623ef44270890519f08b98e9db8afee /include/linux/debugobjects.h | |
| parent | 02d5341ae53d32681241b27a40397475caef1c83 (diff) | |
poll: avoid extra wakeups in select/poll
After introduction of keyed wakeups Davide Libenzi did on epoll, we are
able to avoid spurious wakeups in poll()/select() code too.
For example, typical use of poll()/select() is to wait for incoming
network frames on many sockets. But TX completion for UDP/TCP frames call
sock_wfree() which in turn schedules thread.
When scheduled, thread does a full scan of all polled fds and can sleep
again, because nothing is really available. If number of fds is large,
this cause significant load.
This patch makes select()/poll() aware of keyed wakeups and useless
wakeups are avoided. This reduces number of context switches by about 50%
on some setups, and work performed by sofirq handlers.
Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: Andi Kleen <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: Davide Libenzi <[email protected]>
Cc: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions