]> git.baikalelectronics.ru Git - kernel.git/commit
Fix performance regression on lmbench select benchmark
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Jun 2008 19:23:15 +0000 (12:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Jun 2008 19:23:15 +0000 (12:23 -0700)
commit83e22a1f7a5b56483d90e3f15fcfef14ee98cb49
tree15ebcc7a51fdf1ff2bf76ade337a637c0990055d
parentd825391d19845dcbfe68ea4a3d8be5c47b748431
Fix performance regression on lmbench select benchmark

Christian Borntraeger reported that reinstating cond_resched() with
CONFIG_PREEMPT caused a performance regression on lmbench:

For example select file 500:
23 microseconds
32 microseconds

and that's really because we totally unnecessarily do the cond_resched()
in the innermost loop of select(), which is just silly.

This moves it out from the innermost loop (which only ever loops ove the
bits in a single "unsigned long" anyway), which makes the performance
regression go away.

Reported-and-tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/select.c