• Joel Fernandes (Google)'s avatar
    rcu: Add multiple in-flight batches of kfree_rcu() work · 0392bebe
    Joel Fernandes (Google) authored
    During testing, it was observed that amount of memory consumed due
    kfree_rcu() batching is 300-400MB. Previously we had only a single
    head_free pointer pointing to the list of rcu_head(s) that are to be
    freed after a grace period. Until this list is drained, we cannot queue
    any more objects on it since such objects may not be ready to be
    reclaimed when the worker thread eventually gets to drainin g the
    head_free list.
    
    We can do better by maintaining multiple lists as done by this patch.
    Testing shows that memory consumption came down by around 100-150MB with
    just adding another list. Adding more than 1 additional list did not
    show any improvement.
    Suggested-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
    Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
    [ paulmck: Code style and initialization handling. ]
    [ paulmck: Fix field name, reported by kbuild test robot <lkp@intel.com>. ]
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    0392bebe
tree.c 121 KB