Re: Fw: potential /dev/urandom scalability improvement
From: Matt Mackall
Date: Thu Mar 25 2004 - 17:57:04 EST
On Thu, Mar 25, 2004 at 02:19:23PM -0800, Andrew Morton wrote:
>
> Matt, could you please review David's changes?
>
> Begin forwarded message:
>
> Date: Wed, 24 Mar 2004 22:06:57 -0800
> From: David Mosberger <davidm@xxxxxxxxxxxxxxxxx>
> To: akpm@xxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx
> Subject: potential /dev/urandom scalability improvement
>
>
> Hi Andrew,
>
> I'm addressing this patch to you because you seem to have been the
> person who most recently made some performance improvements to the
> random driver.
That was probably me, actually.
> Oh, and somebody who actually understands this code may want to
> double-check the patch for correctness.
Seems perfectly sane.
However, I've got a few pending patches that touch the same areas and
do some more critical cleanup that I've been sitting on since the
2.6.0 freeze. So perhaps I should start pushing those again and we can
queue this behind them. David, if you get a chance, grab the latest
copy of my linux-tiny tree from
http://www.selenic.com/tiny/2.6.5-rc2-tiny1-broken-out.tar.bz2
http://www.selenic.com/tiny/2.6.5-rc2-tiny1.patch.bz2
and see how I've tweaked the pool structure and the locking and how
your bits fit with it.
> +#ifdef ARCH_HAS_PREFETCH
> + for (cp = (char *) r->pool; cp <= (char *) (r->pool + wordmask); cp += PREFETCH_STRIDE)
> + prefetch(cp);
> +#endif
Can we avoid adding this ifdef in some fashion? What does the compiler
generate here when prefetch is a no-op? This seems to call for a
prefetch_range(start, len) function/macro in any case.
--
Matt Mackall : http://www.selenic.com : Linux development and consulting
-
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/