On Fri, Jan 10, 2025 at 08:21:32PM +0800, Li Zhijian wrote: > In the shrink_folio_list() function, demote_folio_list() can be called > multiple times, which can lead to inaccurate demotion statistics if the > number of demoted pages is not accumulated correctly. It looks like demotion will only be attempted once. On the second pass, do_demote_pass will be false, demote_folios will be empty and demote_folio_list() will do nothing. But I guess there is no harm in making nr_demoted an accumulation for less confusion in the future...