Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rcutorture: Test call_srcu() with preemption disabled and not

This commit tests invoking call_srcu() with preemption both enabled
and disabled, via acquiring of pi lock.

[ Joel: reword commit message. ]

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

authored by

Paul E. McKenney and committed by
Joel Fernandes
95c7d025 ab875b3e

+7
+7
kernel/rcu/rcutorture.c
··· 842 842 843 843 static void srcu_torture_deferred_free(struct rcu_torture *rp) 844 844 { 845 + unsigned long flags; 846 + bool lockit = jiffies & 0x1; 847 + 848 + if (lockit) 849 + raw_spin_lock_irqsave(&current->pi_lock, flags); 845 850 call_srcu(srcu_ctlp, &rp->rtort_rcu, rcu_torture_cb); 851 + if (lockit) 852 + raw_spin_unlock_irqrestore(&current->pi_lock, flags); 846 853 } 847 854 848 855 static void srcu_torture_synchronize(void)