From: Paul E. McKenney Date: Sun, 22 Mar 2020 00:15:11 +0000 (-0700) Subject: Merge branches 'doc.2020.02.27a', 'fixes.2020.03.21a', 'kfree_rcu.2020.02.20a', ... X-Git-Tag: v5.10.7~2531^2~18^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa93ec620be378cce1454286122915533ff8fa48;p=platform%2Fkernel%2Flinux-rpi.git Merge branches 'doc.2020.02.27a', 'fixes.2020.03.21a', 'kfree_rcu.2020.02.20a', 'locktorture.2020.02.20a', 'ovld.2020.02.20a', 'rcu-tasks.2020.02.20a', 'srcu.2020.02.20a' and 'torture.2020.02.20a' into HEAD doc.2020.02.27a: Documentation updates. fixes.2020.03.21a: Miscellaneous fixes. kfree_rcu.2020.02.20a: Updates to kfree_rcu(). locktorture.2020.02.20a: Lock torture-test updates. ovld.2020.02.20a: Updates to callback-overload handling. rcu-tasks.2020.02.20a: RCU-tasks updates. srcu.2020.02.20a: SRCU updates. torture.2020.02.20a: Torture-test updates. --- aa93ec620be378cce1454286122915533ff8fa48 diff --cc kernel/rcu/tree.c index d91c915,35292c8,909f97e,d91c915,0a9de9f,d91c915,d91c915,d91c915..550193a --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@@@@@@@@ -2579,11 -2579,11 -2579,11 -2579,11 -2601,48 -2579,11 -2579,11 -2579,11 +2601,48 @@@@@@@@@ static void rcu_leak_callback(struct rc } /* ---- --- * Helper function for call_rcu() and friends. The cpu argument will ---- --- * normally be -1, indicating "currently running CPU". It may specify ---- --- * a CPU only if that CPU is a no-CBs CPU. Currently, only rcu_barrier() ---- --- * is expected to specify a CPU. ++++ +++ * Check and if necessary update the leaf rcu_node structure's ++++ +++ * ->cbovldmask bit corresponding to the current CPU based on that CPU's ++++ +++ * number of queued RCU callbacks. The caller must hold the leaf rcu_node ++++ +++ * structure's ->lock. + */ ++++ +++static void check_cb_ovld_locked(struct rcu_data *rdp, struct rcu_node *rnp) ++++ +++{ ++++ +++ raw_lockdep_assert_held_rcu_node(rnp); ++++ +++ if (qovld_calc <= 0) ++++ +++ return; // Early boot and wildcard value set. ++++ +++ if (rcu_segcblist_n_cbs(&rdp->cblist) >= qovld_calc) ++++ +++ WRITE_ONCE(rnp->cbovldmask, rnp->cbovldmask | rdp->grpmask); ++++ +++ else ++++ +++ WRITE_ONCE(rnp->cbovldmask, rnp->cbovldmask & ~rdp->grpmask); ++++ +++} ++++ +++ ++++ +++/* ++++ +++ * Check and if necessary update the leaf rcu_node structure's ++++ +++ * ->cbovldmask bit corresponding to the current CPU based on that CPU's ++++ +++ * number of queued RCU callbacks. No locks need be held, but the ++++ +++ * caller must have disabled interrupts. ++++ +++ * ++++ +++ * Note that this function ignores the possibility that there are a lot ++++ +++ * of callbacks all of which have already seen the end of their respective ++++ +++ * grace periods. This omission is due to the need for no-CBs CPUs to ++++ +++ * be holding ->nocb_lock to do this check, which is too heavy for a ++++ +++ * common-case operation. + ++ +++ */ ++++ +++static void check_cb_ovld(struct rcu_data *rdp) ++++ +++{ ++++ +++ struct rcu_node *const rnp = rdp->mynode; ++++ +++ ++++ +++ if (qovld_calc <= 0 || ++++ +++ ((rcu_segcblist_n_cbs(&rdp->cblist) >= qovld_calc) == ++++ +++ !!(READ_ONCE(rnp->cbovldmask) & rdp->grpmask))) ++++ +++ return; // Early boot wildcard value or already set correctly. ++++ +++ raw_spin_lock_rcu_node(rnp); ++++ +++ check_cb_ovld_locked(rdp, rnp); ++++ +++ raw_spin_unlock_rcu_node(rnp); ++++ +++} ++++ +++ ++++ +++/* Helper function for call_rcu() and friends. */ static void __call_rcu(struct rcu_head *head, rcu_callback_t func) {