Messages in this thread | | | Date | Thu, 23 May 2002 09:34:16 -0700 (PDT) | Subject | Re: Q: PREFETCH_STRIDE/16 | From | "David S. Miller" <> |
| |
From: David Mosberger <davidm@napali.hpl.hp.com> Date: Thu, 23 May 2002 09:43:54 -0700
DaveM> All of these particular prefetches are amusing, with or DaveM> without your fix, considering there are other more powerful DaveM> ways to optimize this stuff. :-)
What do you have in mind?
I mentioned this 1 or 2 days ago in the TLB thread with Linus, you pessimistically maintain a tiny bitmap per mm_struct which keeps track of where mappings actually are. You use some hash function on the virtual address to determine the bit. You clear it when the mm_struct is new, and you just set bits when mappings are installed. Very simple.
Then all of these "walk all valid page tables" loops that scan entire mostly empty pages of pgd/pmd/pte entries for no reason can just check the bitmap instead.
Most of the exit overhead is in clear_page_tables walking over entire pages. It effectively flushes the cache unless all you are doing is fork/exit/fork/exit - 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/
| |