wait.[ch]: Introduce the simple waitqueue (swait) implementation
authorPeter Zijlstra (Intel) <peterz@infradead.org>
Fri, 19 Feb 2016 08:46:37 +0000 (09:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 25 Feb 2016 10:27:16 +0000 (11:27 +0100)
commit13b35686e8b934ff78f59cef0c65fa3a43f8eeaf
treef4d92d7d6fc1e70d6fa67aea9efba546c9cc4781
parentf4bcfa1da6fdcbc7a0854a28603bffc3c5656332
wait.[ch]: Introduce the simple waitqueue (swait) implementation

The existing wait queue support has support for custom wake up call
backs, wake flags, wake key (passed to call back) and exclusive
flags that allow wakers to be tagged as exclusive, for limiting
the number of wakers.

In a lot of cases, none of these features are used, and hence we
can benefit from a slimmed down version that lowers memory overhead
and reduces runtime overhead.

The concept originated from -rt, where waitqueues are a constant
source of trouble, as we can't convert the head lock to a raw
spinlock due to fancy and long lasting callbacks.

With the removal of custom callbacks, we can use a raw lock for
queue list manipulations, hence allowing the simple wait support
to be used in -rt.

[Patch is from PeterZ which is based on Thomas version. Commit message is
 written by Paul G.
 Daniel:  - Fixed some compile issues
    - Added non-lazy implementation of swake_up_locked as suggested
     by Boqun Feng.]

Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: linux-rt-users@vger.kernel.org
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1455871601-27484-2-git-send-email-wagi@monom.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/swait.h [new file with mode: 0644]
kernel/sched/Makefile
kernel/sched/swait.c [new file with mode: 0644]
This page took 0.028103 seconds and 5 git commands to generate.