Re: [Patch 1/3] prefetch the mmap_sem in the fault path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-02-23 at 10:39 +0100, Andi Kleen wrote:
> On Thursday 23 February 2006 10:30, Arjan van de Ven wrote:
> > In a micro-benchmark that stresses the pagefault path, the down_read_trylock
> > on the mmap_sem showed up quite high on the profile. Turns out this lock is
> > bouncing between cpus quite a bit and thus is cache-cold a lot. This patch
> > prefetches the lock (for write) as early as possible (and before some other
> > somewhat expensive operations). With this patch, the down_read_trylock
> > basically fell out of the top of profile.
> 
> It is hard to believe because you effectively didn't do the prefetch
> very early

all you need is a few dozen cycles though; there's a cr2 move and the
entire notifier inbetween.... neither of those is really cheap.


(and after patch 3/3 also a page allocation/clear)

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux