From: Arjan van de Ven Date: Sat, 25 Mar 2006 15:30:10 +0000 (+0100) Subject: [PATCH] x86_64: prefetch the mmap_sem in the fault path X-Git-Tag: v2.6.17-rc1~705 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9ba9a3b3897561d01e04cd21433746df46548c0;p=pandora-kernel.git [PATCH] x86_64: prefetch the mmap_sem in the fault path 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. Signed-off-by: Arjan van de Ven Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed