aboutsummaryrefslogtreecommitdiff
path: root/kernel/rcupdate.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-18 17:16:06 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-18 17:16:06 -0400
commit5a476deff3d17093da39c4eccb2692ba714dcb11 (patch)
tree16f5c745a3c8ac780a218ad3d43e32f33164bcf5 /kernel/rcupdate.c
parentdd4efa44ebf2a8a0e5edf60a53eadec981b4b10a (diff)
parent39ca371c45b04cd50d0974030ae051906fc516b6 (diff)
Merge branch 'master'
Diffstat (limited to 'kernel/rcupdate.c')
-rw-r--r--kernel/rcupdate.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index bef3b6901b7..2559d4b8f23 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -71,7 +71,7 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
/* Fake initialization required by compiler */
static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
-static int maxbatch = 10;
+static int maxbatch = 10000;
#ifndef __HAVE_ARCH_CMPXCHG
/*
@@ -109,6 +109,10 @@ void fastcall call_rcu(struct rcu_head *head,
rdp = &__get_cpu_var(rcu_data);
*rdp->nxttail = head;
rdp->nxttail = &head->next;
+
+ if (unlikely(++rdp->count > 10000))
+ set_need_resched();
+
local_irq_restore(flags);
}
@@ -140,6 +144,12 @@ void fastcall call_rcu_bh(struct rcu_head *head,
rdp = &__get_cpu_var(rcu_bh_data);
*rdp->nxttail = head;
rdp->nxttail = &head->next;
+ rdp->count++;
+/*
+ * Should we directly call rcu_do_batch() here ?
+ * if (unlikely(rdp->count > 10000))
+ * rcu_do_batch(rdp);
+ */
local_irq_restore(flags);
}
@@ -157,6 +167,7 @@ static void rcu_do_batch(struct rcu_data *rdp)
next = rdp->donelist = list->next;
list->func(list);
list = next;
+ rdp->count--;
if (++count >= maxbatch)
break;
}