All of lore.kernel.org
 help / color / mirror / Atom feed
* adjust prefetch in free_one_pgd()
@ 2002-08-02  0:12 David Mosberger
  2002-08-02 13:04 ` Alan Cox
  0 siblings, 1 reply; 17+ messages in thread
From: David Mosberger @ 2002-08-02  0:12 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, davidm

As per an earlier discussion on the lkml, the existing prefetch in
free_one_pgd() is somewhat broken in that it prefetches further than
PREFETCH_STRIDE bytes.  The patch below fixes that.  I'm told that
this also performs better on x86 (it makes little difference on ia64,
but it is also marginally better).

	--david

diff -Nru a/mm/memory.c b/mm/memory.c
--- a/mm/memory.c	Thu Aug  1 17:02:14 2002
+++ b/mm/memory.c	Thu Aug  1 17:02:14 2002
@@ -110,7 +110,7 @@
 	pmd = pmd_offset(dir, 0);
 	pgd_clear(dir);
 	for (j = 0; j < PTRS_PER_PMD ; j++) {
-		prefetchw(pmd+j+(PREFETCH_STRIDE/16));
+		prefetchw(pmd + j + PREFETCH_STRIDE/sizeof(*pmd));
 		free_one_pmd(tlb, pmd+j);
 	}
 	pmd_free_tlb(tlb, pmd);

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-08-03 22:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-02  0:12 adjust prefetch in free_one_pgd() David Mosberger
2002-08-02 13:04 ` Alan Cox
2002-08-02 15:39   ` David Mosberger
2002-08-02 15:46     ` Linus Torvalds
2002-08-02 15:56       ` Dave Jones
2002-08-02 15:59         ` Linus Torvalds
2002-08-02 16:04           ` Dave Jones
2002-08-02 17:49       ` Alan Cox
2002-08-02 16:38         ` David Mosberger
2002-08-02 17:58           ` Alan Cox
2002-08-02 16:53             ` David Mosberger
2002-08-03 16:59       ` David Woodhouse
2002-08-03 17:22         ` Linus Torvalds
2002-08-03 17:39           ` David Woodhouse
2002-08-03 19:36             ` Linus Torvalds
2002-08-03 22:03               ` David Woodhouse
2002-08-03 22:40                 ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.