]> git.hungrycats.org Git - linux/commit
[PATCH] speed up rmap searching
authorAndrew Morton <akpm@digeo.com>
Wed, 9 Apr 2003 04:30:06 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 9 Apr 2003 04:30:06 +0000 (21:30 -0700)
commit3523bd5550d7452589952237cc02730c952abd88
treeb5f29d2ea738ac26b63b09bf0e2b24104001a8f0
parent596c3a20754aea9470b4a92cec925d0feeca50c7
[PATCH] speed up rmap searching

several functions in rmap.c are searching the ptes[] array fo find the first
non-null entry.

Despite the fact tha the whole lot is in L1 cache, it is expensive,
especially on 128-byte cacheline machines.

We can encode the index of the first non-null pte entry inside the
pte_chain's `next' field and remove those searches altogether.

This reduces the rmap CPU tax by about 25% on a P4.  For a total runtime
reduction of around 5% in the bash-script intensive test which I use.
mm/rmap.c