[lkml]   [2006]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RCU] adds a prefetch() in rcu_do_batch()
On Thursday 30 November 2006 02:25, Paul E. McKenney wrote:
> On Wed, Nov 22, 2006 at 04:02:29PM +0100, Eric Dumazet wrote:
> > 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 patches 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]);}
> Interesting! How much of the speedup was due to the prefetch() and how
> much to removing the extra store to rdp->donelist?

I only benchmarked the prefetch() case.

Then, when cooking the patch I found I could do the rdp->donelist affectation
after the loop. I am not sure it's worth to do another benchmark for this
trivial optimization (Please dont tell me its not a valid one :) )

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-30 09:59    [W:0.100 / U:6.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site