The patch titled rcu: add a prefetch() in rcu_do_batch() has been added to the -mm tree. Its filename is rcu-add-a-prefetch-in-rcu_do_batch.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: rcu: add a prefetch() in rcu_do_batch() From: Eric Dumazet <dada1@xxxxxxxxxxxxx> On some workloads, (for example when lot of close() syscalls are done), RCU qlen can be quite large, and RCU heads are no longer in cpu cache when rcu_do_batch() is called. This patch adds a prefetch() in rcu_do_batch() to give CPU a hint to bring back cache lines containing 'struct rcu_head's. Most list manipulations macros include prefetch(), but not open coded ones (at least with current C compilers :) ) I got a nice speedup on a trivial benchmark (3.48 us per iteration instead of 3.95 us on a 1.6 GHz Pentium-M) while (1) { pipe(p); close(fd[0]); close(fd[1]);} Signed-off-by: Eric Dumazet <dada1@xxxxxxxxxxxxx> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/rcupdate.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN kernel/rcupdate.c~rcu-add-a-prefetch-in-rcu_do_batch kernel/rcupdate.c --- a/kernel/rcupdate.c~rcu-add-a-prefetch-in-rcu_do_batch +++ a/kernel/rcupdate.c @@ -235,12 +235,14 @@ static void rcu_do_batch(struct rcu_data list = rdp->donelist; while (list) { - next = rdp->donelist = list->next; + next = list->next; + prefetch(next); list->func(list); list = next; if (++count >= rdp->blimit) break; } + rdp->donelist = list; local_irq_disable(); rdp->qlen -= count; _ Patches currently in -mm which might be from dada1@xxxxxxxxxxxxx are git-net.patch rcu-add-a-prefetch-in-rcu_do_batch.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html