Re: Fw: potential /dev/urandom scalability improvement

From: Dave Jones
Date: Fri Mar 26 2004 - 13:41:06 EST


On Fri, Mar 26, 2004 at 10:08:39AM -0800, David Mosberger wrote:

> > I think this may be dangerous on some CPUs, if may prefetch
> > past the end of the buffer. Ie, if PREFETCH_STRIDE was 32, and
> > len was 65, we'd end up prefetching 65->97. As well as being
> > wasteful to cachelines, this can crash if theres for eg
> > nothing mapped after the next page boundary.
>
> Huh? It only ever prefetches addresses that are _within_ the
> specified buffer. Of course it will prefetch entire cachelines, but I
> hope you're not worried about cachlines crossing page-boundaries! ;-))

The proposed only user of this may take care of this requirement, but
I'm more concerned someone not aware of this requirement using this
helper routine. At the least it deserves a comment IMO.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/