public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PM / Wakeup: remove useless synchronize_rcu() call
@ 2011-05-11 20:15 Eric Dumazet
  2011-05-11 20:43 ` Rafael J. Wysocki
  2011-05-11 20:47 ` Paul E. McKenney
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2011-05-11 20:15 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel, Paul E. McKenney, Greg Kroah-Hartman, David Miller

wakeup_source_add() adds an item into wakeup_sources list.

There is no need to call synchronize_rcu() at this point.

Its only needed in wakeup_source_remove()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: David Miller <davem@davemloft.net>,
CC: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/power/wakeup.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index abbbd33..84f7c7d 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -110,7 +110,6 @@ void wakeup_source_add(struct wakeup_source *ws)
 	spin_lock_irq(&events_lock);
 	list_add_rcu(&ws->entry, &wakeup_sources);
 	spin_unlock_irq(&events_lock);
-	synchronize_rcu();
 }
 EXPORT_SYMBOL_GPL(wakeup_source_add);
 



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

* Re: PM / Wakeup: remove useless synchronize_rcu() call
  2011-05-11 20:15 PM / Wakeup: remove useless synchronize_rcu() call Eric Dumazet
@ 2011-05-11 20:43 ` Rafael J. Wysocki
  2011-05-11 20:47 ` Paul E. McKenney
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2011-05-11 20:43 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: linux-kernel, Paul E. McKenney, Greg Kroah-Hartman, David Miller

On Wednesday, May 11, 2011, Eric Dumazet wrote:
> wakeup_source_add() adds an item into wakeup_sources list.
> 
> There is no need to call synchronize_rcu() at this point.
> 
> Its only needed in wakeup_source_remove()
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> CC: David Miller <davem@davemloft.net>,
> CC: Greg Kroah-Hartman <gregkh@suse.de>

Applied to suspend-2.6/linux-next.

Thanks,
Rafael


> ---
>  drivers/base/power/wakeup.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index abbbd33..84f7c7d 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -110,7 +110,6 @@ void wakeup_source_add(struct wakeup_source *ws)
>  	spin_lock_irq(&events_lock);
>  	list_add_rcu(&ws->entry, &wakeup_sources);
>  	spin_unlock_irq(&events_lock);
> -	synchronize_rcu();
>  }
>  EXPORT_SYMBOL_GPL(wakeup_source_add);
>  
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 


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

* Re: PM / Wakeup: remove useless synchronize_rcu() call
  2011-05-11 20:15 PM / Wakeup: remove useless synchronize_rcu() call Eric Dumazet
  2011-05-11 20:43 ` Rafael J. Wysocki
@ 2011-05-11 20:47 ` Paul E. McKenney
  1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2011-05-11 20:47 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Rafael J. Wysocki, linux-kernel, Greg Kroah-Hartman, David Miller

On Wed, May 11, 2011 at 10:15:59PM +0200, Eric Dumazet wrote:
> wakeup_source_add() adds an item into wakeup_sources list.
> 
> There is no need to call synchronize_rcu() at this point.
> 
> Its only needed in wakeup_source_remove()
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

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

> CC: David Miller <davem@davemloft.net>,
> CC: Greg Kroah-Hartman <gregkh@suse.de>
> ---
>  drivers/base/power/wakeup.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index abbbd33..84f7c7d 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -110,7 +110,6 @@ void wakeup_source_add(struct wakeup_source *ws)
>  	spin_lock_irq(&events_lock);
>  	list_add_rcu(&ws->entry, &wakeup_sources);
>  	spin_unlock_irq(&events_lock);
> -	synchronize_rcu();
>  }
>  EXPORT_SYMBOL_GPL(wakeup_source_add);
> 
> 
> 

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

end of thread, other threads:[~2011-05-11 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 20:15 PM / Wakeup: remove useless synchronize_rcu() call Eric Dumazet
2011-05-11 20:43 ` Rafael J. Wysocki
2011-05-11 20:47 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox