> "Steven Whitehouse wrote:"
> > Thats effectively what PF_MEMALLOC does. The code in question is in
> > page_alloc.c:__alloc_pages just before and after the rebalance: label.
> > The z->pages_min gives a per zone minimum for "other processes" that are
> > not PF_MEMALLOC,
> A related question, then ... can one adjust the difference between the
> ceiling for "normal" processes and PF_MEMALLOC processes, and if so,
In page_alloc.c:__alloc_pages() the minimum is calculated for each memory
zone as (1UL << order) plus z->pages_low for each zone scanned whilst
looking for memory. Various scans are done, but z->pages_min is the key
number from which the limits are calculated.
It appears that z->pages_min is initialized in
page_alloc.c:free_area_init_core() to the real size of the zone divided
by zone_balance_ratio (set to 128 by default) for that zone and clamped to
zone_balance_max (set to 255 by default) and zone_balance_min (set to 20
It appears that the memfrac= command line option should allow tweeking
of zone_balance_ratio but if you've got more than approx 128M of memory it
would appear (if I've understood this correctly) that you'll have the
maximum of 255 pages for z->pages_min.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/