From: Andre Noll Date: Sat, 30 Mar 2013 22:43:38 +0000 (+0000) Subject: sched: Get rid of (pre)select shortcuts. X-Git-Tag: v0.4.13~39^2~43 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=01f8023b7fe59abc29072c7b84caec5961f8f14b;hp=01f8023b7fe59abc29072c7b84caec5961f8f14b sched: Get rid of (pre)select shortcuts. These shortcuts let the scheduler skip any subsequent ->pre_select() calls as well as the actual call to select(2) if the current task's ->pre_select() requested a zero timeout. This idea turned out to be dubios at best. The main problem is that ->post_select no longer knows whether ->pre_select() and select() have been called. For example, if ->pre_select() monitors some file descriptor, ->post_select() might find it not ready for I/O even when it actually is because ->pre_select() or select() was optimized away. Another problem are tasks whose ->post_select() method expects that ->pre_select() sets some variable in a shared data structure. This patch removes the scheduler optimizations so that all ->pre_select() methods of all tasks are called once per scheduler interval. ---