Commit 782a6747 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] minor RCU optimization

From: Stephen Hemminger <shemminger@osdl.org>

Minor tweak to rcu, use __list_splice instead of list_splice because the
  list has already been checked for empty.
parent 414f3455
...@@ -223,13 +223,13 @@ static void rcu_process_callbacks(unsigned long unused) ...@@ -223,13 +223,13 @@ static void rcu_process_callbacks(unsigned long unused)
if (!list_empty(&RCU_curlist(cpu)) && if (!list_empty(&RCU_curlist(cpu)) &&
rcu_batch_after(rcu_ctrlblk.curbatch, RCU_batch(cpu))) { rcu_batch_after(rcu_ctrlblk.curbatch, RCU_batch(cpu))) {
list_splice(&RCU_curlist(cpu), &list); __list_splice(&RCU_curlist(cpu), &list);
INIT_LIST_HEAD(&RCU_curlist(cpu)); INIT_LIST_HEAD(&RCU_curlist(cpu));
} }
local_irq_disable(); local_irq_disable();
if (!list_empty(&RCU_nxtlist(cpu)) && list_empty(&RCU_curlist(cpu))) { if (!list_empty(&RCU_nxtlist(cpu)) && list_empty(&RCU_curlist(cpu))) {
list_splice(&RCU_nxtlist(cpu), &RCU_curlist(cpu)); __list_splice(&RCU_nxtlist(cpu), &RCU_curlist(cpu));
INIT_LIST_HEAD(&RCU_nxtlist(cpu)); INIT_LIST_HEAD(&RCU_nxtlist(cpu));
local_irq_enable(); local_irq_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment