Commit 98141718 authored by Hao Ge's avatar Hao Ge Committed by Andrew Morton

mm/vmscan: make too_many_isolated return bool

too_many_isolated() should return bool as does the similar
too_many_isolated() in mm/compaction.c.

Link: https://lkml.kernel.org/r/20240205042618.108140-1-gehao@kylinos.cnSigned-off-by: default avatarHao Ge <gehao@kylinos.cn>
Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 73307523
...@@ -1744,17 +1744,17 @@ bool folio_isolate_lru(struct folio *folio) ...@@ -1744,17 +1744,17 @@ bool folio_isolate_lru(struct folio *folio)
* the LRU list will go small and be scanned faster than necessary, leading to * the LRU list will go small and be scanned faster than necessary, leading to
* unnecessary swapping, thrashing and OOM. * unnecessary swapping, thrashing and OOM.
*/ */
static int too_many_isolated(struct pglist_data *pgdat, int file, static bool too_many_isolated(struct pglist_data *pgdat, int file,
struct scan_control *sc) struct scan_control *sc)
{ {
unsigned long inactive, isolated; unsigned long inactive, isolated;
bool too_many; bool too_many;
if (current_is_kswapd()) if (current_is_kswapd())
return 0; return false;
if (!writeback_throttling_sane(sc)) if (!writeback_throttling_sane(sc))
return 0; return false;
if (file) { if (file) {
inactive = node_page_state(pgdat, NR_INACTIVE_FILE); inactive = node_page_state(pgdat, NR_INACTIVE_FILE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment