Messages in this thread | | | From | David Mosberger <> | Date | Thu, 23 May 2002 11:32:24 -0700 | Subject | Re: Q: PREFETCH_STRIDE/16 |
| |
>>>>> On Thu, 23 May 2002 10:00:58 -0700 (PDT), "David S. Miller" <davem@redhat.com> said:
DaveM> You'd be surprised how many 0 bits there will be in the DaveM> average process. Even if you bring in all of emacs, glibc, DaveM> X11R6 libs etc. and the anonymous memory, there are still a DaveM> HUGE portion of the address space totally unused.
But don't confuse the portion of address space used with the number of page tables in use! Even if you use a teeny tiny portion of a 64-bit address space, you can still have hundreds and thousands of page table pages.
Also, we should not ignore the advantages of the current scheme:
o It's so straight-forward, it's virtually impossible to screw it up (with the hashed scheme, forgetting to set a bit just once could lead to very difficult-to-track-down bugs; been there, done that, in a slightly different context, and it was ugly...).
o Performance is very predicable (basically linear in virtual address space in use). There is a danger that a hashed scheme would be optimized for today's workloads. As the working sets increase over the years, the hashed scheme could eventually break down and the worst part would be that it would be very hard to notice (only effect is bad performance for very large tasks; few benchmarks would probably catch such worse-than-optimal performance).
DaveM> But like you said, worth experimenting with :-) First test DaveM> would be, start with 1 unsigned long as the bitmask in DaveM> mm_context_t. Just implement the bit setting part. Then at DaveM> exit() count how many 0 bits are left, record this into some DaveM> counter table which has one counter for 0 --> N_BITS_IN_LONG. DaveM> Make some debug /proc thing which spits the table out. DaveM> (hint: at fork, clear out the child's bitmask before DaveM> copy_page_range is run for best results :-)
DaveM> You can use this to do vaious things and see how much there DaveM> is to gain by going to two unsigned longs, three, etc.
DaveM> Then you can hack up the actual clear_page_tables DaveM> optimization (to start) and measure the result.
Yes. Hopefully, someone with some spare time at hand can play with this.
--david - 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/
| |