Skip to contentSkip to conversation

PM / Wakeup: remove useless synchronize_rcu() call

PATCH Applied Eric Dumazet 3 participants 3 messages May 11, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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()

CC "Paul E. McKenney" <[email protected]>
CC David Miller <[email protected]>,
CC Greg Kroah-Hartman <[email protected]>
---
 drivers/base/power/wakeup.c |    1 -
 1 file changed, 1 deletion(-)
drivers/base/power/wakeup.c +0 -1
index abbbd33..84f7c7d 100644
@@ -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);
 
#1 lore raw
Quoted 10 lines · Eric Dumazet

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()

CC "Paul E. McKenney" <[email protected]>
CC David Miller <[email protected]>,
CC Greg Kroah-Hartman <[email protected]>

Applied to suspend-2.6/linux-next.

Thanks,
Rafael

Quoted 25 lines
---
 drivers/base/power/wakeup.c |    1 -
 1 file changed, 1 deletion(-)
drivers/base/power/wakeup.c +0 -2
index abbbd33..84f7c7d 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Reviewed-by
#2 lore raw
In reply to Eric Dumazet
Quoted 8 lines · Eric Dumazet

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()

CC "Paul E. McKenney" <[email protected]>
Quoted 20 lines
CC David Miller <[email protected]>,
CC Greg Kroah-Hartman <[email protected]>
---
 drivers/base/power/wakeup.c |    1 -
 1 file changed, 1 deletion(-)
drivers/base/power/wakeup.c +0 -1
index abbbd33..84f7c7d 100644
@@ -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);