Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Ingo Molnar:
"Update the <linux/swait.h> documentation to discourage their use"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/swait: Document it clearly that the swait facilities are special and shouldn't be used

+16 -11
+16 -11
include/linux/swait.h
··· 9 9 /* 10 10 * Simple wait queues 11 11 * 12 - * While these are very similar to the other/complex wait queues (wait.h) the 13 - * most important difference is that the simple waitqueue allows for 14 - * deterministic behaviour -- IOW it has strictly bounded IRQ and lock hold 15 - * times. 12 + * While these are very similar to regular wait queues (wait.h) the most 13 + * important difference is that the simple waitqueue allows for deterministic 14 + * behaviour -- IOW it has strictly bounded IRQ and lock hold times. 16 15 * 17 - * In order to make this so, we had to drop a fair number of features of the 18 - * other waitqueue code; notably: 16 + * Mainly, this is accomplished by two things. Firstly not allowing swake_up_all 17 + * from IRQ disabled, and dropping the lock upon every wakeup, giving a higher 18 + * priority task a chance to run. 19 + * 20 + * Secondly, we had to drop a fair number of features of the other waitqueue 21 + * code; notably: 19 22 * 20 23 * - mixing INTERRUPTIBLE and UNINTERRUPTIBLE sleeps on the same waitqueue; 21 24 * all wakeups are TASK_NORMAL in order to avoid O(n) lookups for the right ··· 27 24 * - the exclusive mode; because this requires preserving the list order 28 25 * and this is hard. 29 26 * 30 - * - custom wake functions; because you cannot give any guarantees about 31 - * random code. 27 + * - custom wake callback functions; because you cannot give any guarantees 28 + * about random code. This also allows swait to be used in RT, such that 29 + * raw spinlock can be used for the swait queue head. 32 30 * 33 - * As a side effect of this; the data structures are slimmer. 34 - * 35 - * One would recommend using this wait queue where possible. 31 + * As a side effect of these; the data structures are slimmer albeit more ad-hoc. 32 + * For all the above, note that simple wait queues should _only_ be used under 33 + * very specific realtime constraints -- it is best to stick with the regular 34 + * wait queues in most cases. 36 35 */ 37 36 38 37 struct task_struct;