Eric Dumazet 1c69d921ed [PATCH] rcu: add a prefetch() in rcu_do_batch()
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@cosmosbay.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:40 -08:00
..
2006-09-11 13:32:30 -04:00
2006-09-29 09:18:12 -07:00
2006-12-07 08:39:25 -08:00
2006-10-03 08:03:41 -07:00
2006-03-26 08:57:03 -08:00
2006-12-07 08:39:36 -08:00
2006-09-29 09:18:15 -07:00
2006-12-04 02:00:22 -05:00
2006-07-03 15:27:04 -07:00
2006-12-04 02:00:22 -05:00
2006-09-30 01:47:55 +02:00
2006-12-07 08:39:25 -08:00
2006-09-29 09:18:12 -07:00
2006-11-22 14:57:56 +00:00
2005-04-16 15:20:36 -07:00
2006-10-01 00:39:27 -07:00
2006-04-19 16:27:18 -07:00
2006-12-07 08:39:25 -08:00
2006-07-10 13:24:25 -07:00