Benjamin LaHaise a écrit :
Besides, we're reducing the cache footprint for many users by only using 1 cacheline per struct page instead of the 2 for every 7 out of 8 struct pages currently. How many places in the kernel really do a linear walk of the struct page array? Aside from early boot initialization, I think the answer is 0. Random is far more likely, and this patch helps that usage model.
Ben, sizeof(struct page) is 56. I believe Andi can be trusted if he feels increasing it to 64 is not wise. But I'm very interested by your work.
You are right that is something wants to access full 'struct page', it might need 2 cache lines 7/8 of the time.
In your workload (but without WANT_PAGE_VIRTUAL defined), what precise fields are touched from 'struct page' ? For exampe, is 'struct list_head lru' really touched by network use ?
Maybe we could reduce to 4/8 if we reorder some fields in the structure, if not all fields are *needed* in the hot path ?
I suspect (but I'm certainly wrong) that only the 24 first bytes are really used, so the chance it crosses a cache line border is 2/8 and not 7/8
Eric - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html