Skip to content

Commit

Permalink
rcu: rcu_sched_grace_period(): kill the bogus flush_signals()
Browse files Browse the repository at this point in the history
As a kernel thread, rcu_sched_grace_period() runs with all signals ignored.
It can never receive a signal even if it sleeps in TASK_INTERRUPTIBLE, it
needs the explicit allow_signal() to be visible for signals.

[ Impact: reduce kernel size, remove dead code ]

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20090503211118.GA22973@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed May 5, 2009
1 parent 05725f7 commit 41c51c9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions kernel/rcupreempt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,17 +1356,11 @@ static int rcu_sched_grace_period(void *arg)

rcu_ctrlblk.sched_sleep = rcu_sched_sleeping;
spin_unlock_irqrestore(&rcu_ctrlblk.schedlock, flags);
ret = 0;
ret = 0; /* unused */
__wait_event_interruptible(rcu_ctrlblk.sched_wq,
rcu_ctrlblk.sched_sleep != rcu_sched_sleeping,
ret);

/*
* Signals would prevent us from sleeping, and we cannot
* do much with them in any case. So flush them.
*/
if (ret)
flush_signals(current);
couldsleepnext = 0;

} while (!kthread_should_stop());
Expand Down

0 comments on commit 41c51c9

Please sign in to comment.