Re: PG_zero

From: Nick Piggin
Date: Mon Nov 01 2004 - 21:04:05 EST


Andrea Arcangeli wrote:
On Mon, Nov 01, 2004 at 10:03:56AM -0800, Martin J. Bligh wrote:

[..] it was to stop cold
allocations from eating into hot pages [..]


exactly, and I believe that hurts. bouncing on the global lock is going to
hurt more than preserving an hot page (at least on a 512-way). Plus the
cold page may very soon become hot too.


Well, the lock isn't global of course. You might be better off
benchmarking on an old Intel 8-way SMP rather than a 512-way Altix :)

But nevertheless I won't say the lock will never hurt.

Plus you should at least allow an hot allocation to eat into the cold
pages (which didn't happen IIRC).

I simply believe using the lru ordering is a more efficient way to
implement hot/cold behaviour and it will save some minor ram too (with
big lists the reservation might even confuse the oom conditions, if the
allocation is hot, but the VM frees in the cold "stopped" list). I know
the cold list was a lot smaller so this is probably only a theoretical
issue.


If you don't have cold allocations eating hot pages, nor cold frees
pushing out hot pages then it may be worthwhile.

If that helps a lot, then you couldn't you just have hot allocations
also check the cold list before falling back to the buddy?

I admit I didn't look closely at this - mainly the PG_zero stuff.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/