RE: [Patch 3/3] Shrink quicklist based upon node free memory.

From: Luck, Tony <>
Date: 2005-03-03 09:47:53

You define NODE_FREE_PAGES_SHIFT with a comment:

>+/* This value was chosen to prevent a large block of frees to hold off timer ticks */

But then go on to use it in two different ways.  First you limit
the size of the quicklist to 1/16th of the free memory on the node:

>+	max_pgt_pages = node_free_pages >> NODE_FREE_PAGES_SHIFT;

And then as a throttle on how many pages to free before enabling
preemption and recalculating how much to free:

>+		pages_to_free = min(pages_to_free, 1L << NODE_FREE_PAGES_SHIFT);

The second usage matches the comment ... though the two are somewhat
interconnected (freeing 16 pages from the quicklist will raise your
limit on the size of the quicklist since there will now be more
pages free on the node).

Should there be separate defines for these?

I also played with re-arranging the code in check_pgt_cache()
to try to make it prettier ... I'm not sure whether I succeeded
(see attached).


To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at

Received on Wed Mar 2 17:56:42 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST