All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu_sched_grace_period: kill the bogus flush_signals()
@ 2009-05-03 21:11 Oleg Nesterov
  2009-05-03 23:36 ` Paul E. McKenney
  2009-05-05 18:35 ` [tip:core/rcu] rcu: rcu_sched_grace_period(): " tip-bot for Oleg Nesterov
  0 siblings, 2 replies; 3+ messages in thread
From: Oleg Nesterov @ 2009-05-03 21:11 UTC (permalink / raw)
  To: Andrew Morton, Paul E. McKenney; +Cc: linux-kernel

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.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>

--- PTRACE/kernel/rcupreempt.c~	2009-04-09 00:39:10.000000000 +0200
+++ PTRACE/kernel/rcupreempt.c	2009-05-03 02:17:11.000000000 +0200
@@ -1356,17 +1356,11 @@ static int rcu_sched_grace_period(void *
 
 		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());


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rcu_sched_grace_period: kill the bogus flush_signals()
  2009-05-03 21:11 [PATCH] rcu_sched_grace_period: kill the bogus flush_signals() Oleg Nesterov
@ 2009-05-03 23:36 ` Paul E. McKenney
  2009-05-05 18:35 ` [tip:core/rcu] rcu: rcu_sched_grace_period(): " tip-bot for Oleg Nesterov
  1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2009-05-03 23:36 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Andrew Morton, linux-kernel, mingo

On Sun, May 03, 2009 at 11:11:18PM +0200, Oleg Nesterov wrote:
> 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.

Good point!!!

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> 
> --- PTRACE/kernel/rcupreempt.c~	2009-04-09 00:39:10.000000000 +0200
> +++ PTRACE/kernel/rcupreempt.c	2009-05-03 02:17:11.000000000 +0200
> @@ -1356,17 +1356,11 @@ static int rcu_sched_grace_period(void *
> 
>  		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());
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:core/rcu] rcu: rcu_sched_grace_period(): kill the bogus flush_signals()
  2009-05-03 21:11 [PATCH] rcu_sched_grace_period: kill the bogus flush_signals() Oleg Nesterov
  2009-05-03 23:36 ` Paul E. McKenney
@ 2009-05-05 18:35 ` tip-bot for Oleg Nesterov
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Oleg Nesterov @ 2009-05-05 18:35 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulmck, hpa, mingo, akpm, oleg, tglx, mingo

Commit-ID:  41c51c98f588edcdf6141cff1895df738e03ddd4
Gitweb:     http://git.kernel.org/tip/41c51c98f588edcdf6141cff1895df738e03ddd4
Author:     Oleg Nesterov <oleg@redhat.com>
AuthorDate: Sun, 3 May 2009 23:11:18 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 5 May 2009 20:28:05 +0200

rcu: rcu_sched_grace_period(): kill the bogus flush_signals()

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>


---
 kernel/rcupreempt.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
index ce97a4d..beb0e65 100644
--- a/kernel/rcupreempt.c
+++ b/kernel/rcupreempt.c
@@ -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());

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-05 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 21:11 [PATCH] rcu_sched_grace_period: kill the bogus flush_signals() Oleg Nesterov
2009-05-03 23:36 ` Paul E. McKenney
2009-05-05 18:35 ` [tip:core/rcu] rcu: rcu_sched_grace_period(): " tip-bot for Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.