linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: Make too_many_isolated return bool
@ 2024-02-05  4:26 Hao Ge
  2024-02-05  7:11 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Ge @ 2024-02-05  4:26 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, gehao618, Hao Ge

too_many_isolated should return bool which with the same name and
similar functions in mm/compaction.c already returned bool

Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
 mm/vmscan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4f9c854ce6cc..143e4b8e8821 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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
  * 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)
 {
 	unsigned long inactive, isolated;
 	bool too_many;
 
 	if (current_is_kswapd())
-		return 0;
+		return false;
 
 	if (!writeback_throttling_sane(sc))
-		return 0;
+		return false;
 
 	if (file) {
 		inactive = node_page_state(pgdat, NR_INACTIVE_FILE);
-- 
2.25.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/vmscan: Make too_many_isolated return bool
  2024-02-05  4:26 [PATCH] mm/vmscan: Make too_many_isolated return bool Hao Ge
@ 2024-02-05  7:11 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2024-02-05  7:11 UTC (permalink / raw)
  To: Hao Ge; +Cc: akpm, linux-mm, linux-kernel, gehao618

On Mon, Feb 05, 2024 at 12:26:18PM +0800, Hao Ge wrote:
> too_many_isolated should return bool which with the same name and
> similar functions in mm/compaction.c already returned bool
> 
> Signed-off-by: Hao Ge <gehao@kylinos.cn>

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05  4:26 [PATCH] mm/vmscan: Make too_many_isolated return bool Hao Ge
2024-02-05  7:11 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox