• Joel Fernandes (Google)'s avatar
    rcu/segcblist: Add counters to segcblist datastructure · ae5c2341
    Joel Fernandes (Google) authored
    Add counting of segment lengths of segmented callback list.
    
    This will be useful for a number of things such as knowing how big the
    ready-to-execute segment have gotten. The immediate benefit is ability
    to trace how the callbacks in the segmented callback list change.
    
    Also this patch remove hacks related to using donecbs's ->len field as a
    temporary variable to save the segmented callback list's length. This cannot be
    done anymore and is not needed.
    
    Also fix SRCU:
    The negative counting of the unsegmented list cannot be used to adjust
    the segmented one. To fix this, sample the unsegmented length in
    advance, and use it after CB execution to adjust the segmented list's
    length.
    Reviewed-by: default avatarFrederic Weisbecker <frederic@kernel.org>
    Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    ae5c2341
rcu_segcblist.c 19.7 KB