> 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@xxxxxxxxx> > Signed-off-by: Mel Gorman <mel@xxxxxxxxx> Except kamezawa-san pointed piece Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>