25 Feb, 2016

1 commit

  • 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
    Signed-off-by: Daniel Wagner
    Acked-by: Peter Zijlstra (Intel)
    Cc: linux-rt-users@vger.kernel.org
    Cc: Boqun Feng
    Cc: Marcelo Tosatti
    Cc: Steven Rostedt
    Cc: Paul Gortmaker
    Cc: Paolo Bonzini
    Cc: "Paul E. McKenney"
    Link: http://lkml.kernel.org/r/1455871601-27484-2-git-send-email-wagi@monom.org
    Signed-off-by: Thomas Gleixner

    Peter Zijlstra (Intel)