Robin, 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 */ >+#define NODE_FREE_PAGES_SHIFT 4 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). -Tony
check_pgt_cache.c
Description: check_pgt_cache.c
