Messages in this thread | | | Date | Thu, 25 Mar 2004 22:07:10 -0600 | From | Matt Mackall <> | Subject | Re: Fw: potential /dev/urandom scalability improvement |
| |
On Thu, Mar 25, 2004 at 06:00:14PM -0800, Andrew Morton wrote: > David Mosberger <davidm@napali.hpl.hp.com> wrote: > > > > The > > patch below is updated to go on top of your patch and gives about the > > same performance as I reported yesterday. For now, I defined an > > inline prefetch_range(). If and when all architectures get updated to > > define this directly, we can simply remove prefetch_range() from the > > driver. > > We may as well stick prefetch_range() in prefetch.h. > > And Matt's patch series is not a thing I want to take on board at present, > so let's stick with the straight scalability patch for now.
Sigh, I'll trim it back to some bits I think are critical.
> I moved the prefetch_range() call to outside the spinlock. Does that make > sense?
I don't think that's actually a win. If there's contention, threads racing to the lock will grab the same cache lines and all but one thread's cache will end up invalidated by the time the lock is released.
-- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |