• Paul E. McKenney's avatar
    rcutorture: Preempt rather than block when testing task stalls · 59e83666
    Paul E. McKenney authored
    Currently, rcu_torture_stall() does a one-jiffy timed wait when
    stall_cpu_block is set.  This works, but emits a pointless splat in
    CONFIG_PREEMPT=y kernels.  This commit avoids this splat by instead
    invoking preempt_schedule() in CONFIG_PREEMPT=y kernels.
    
    This uses an admittedly ugly #ifdef, but abstracted approaches just
    looked worse.  A prettier approach would provide a preempt_schedule()
    definition with a WARN_ON() for CONFIG_PREEMPT=n kernels, but this seems
    quite silly.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    59e83666
rcutorture.c 96.1 KB