Re: [PATCH] 2.6.4-rc2-mm1: vm-split-active-lists

From: Andrew Morton
Date: Fri Mar 12 2004 - 14:13:55 EST

Nick Piggin <piggin@xxxxxxxxxxxxxxx> wrote:
> Just had a try of doing things like updatedb and dd if=/dev/zero of=./blah
> It is pretty swappy I guess.

You'll need to bring the scanning priority back into the picture: don't
move mapped pages down onto the inactive list at low scanning priorities.
And that eans retaining the remember-the-priority-from-last-time logic.

Otherwise it's inevitable that even a `cat monster_file > /dev/null' will
eventually swap out everything it can.

> By the way, I would be interested to know the rationale behind
> mark_page_accessed as it is without this patch, also what is it doing in
> rmap.c (I know hardly anything actually uses page_test_and_clear_young, but
> still). It seems to me like it only serves to make VM behaviour harder to
> understand, but I'm probably missing something. Andrew?

hm, that's left-over code which is pretty pointless now.

if (page_test_and_clear_young(page))

if (TestClearPageReferenced(page))

The pages in here are never on the LRU, so all the mark_page_accessed()
will do is to set PG_Referenced. And we immediately clear it again. So
the mark_page_accessed() can be replaced with referenced++.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at