Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 1 Nov 2010 16:06:12 +0900 (JST) | From | KOSAKI Motohiro <> | Subject | Re: [PATCH 1/2] mm: page allocator: Adjust the per-cpu counter threshold when memory is low |
| |
> To ensure that kswapd wakes up, a safe version of zone_watermark_ok() > is introduced that takes a more accurate reading of NR_FREE_PAGES when > called from wakeup_kswapd, when deciding whether it is really safe to go > back to sleep in sleeping_prematurely() and when deciding if a zone is > really balanced or not in balance_pgdat(). We are still using an expensive > function but limiting how often it is called. > > When the test case is reproduced, the time spent in the watermark functions > is reduced. The following report is on the percentage of time spent > cumulatively spent in the functions zone_nr_free_pages(), zone_watermark_ok(), > __zone_watermark_ok(), zone_watermark_ok_safe(), zone_page_state_snapshot(), > zone_page_state(). > > vanilla 11.6615% > disable-threshold 0.2584% > > Reported-by: Shaohua Li <shaohua.li@intel.com> > Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Except kamezawa-san pointed piece
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
| ![\](/images/icornerr.gif) |