path: root/mm/internal.h
diff options
authorMel Gorman <>2021-11-05 13:42:42 -0700
committerLinus Torvalds <>2021-11-06 13:30:40 -0700
commitc3f4a9a2b082c5392fbff17c6d8551154add5fdb (patch)
tree94211c0936f4a7fcadcc0ab42fd030a6cffd61e9 /mm/internal.h
parent132b0d21d21f14f74fbe44dd5b8b1848215fff09 (diff)
mm/vmscan: centralise timeout values for reclaim_throttle
Neil Brown raised concerns about callers of reclaim_throttle specifying a timeout value. The original timeout values to congestion_wait() were probably pulled out of thin air or copy&pasted from somewhere else. This patch centralises the timeout values and selects a timeout based on the reason for reclaim throttling. These figures are also pulled out of the same thin air but better values may be derived Running a workload that is throttling for inappropriate periods and tracing mm_vmscan_throttled can be used to pick a more appropriate value. Excessive throttling would pick a lower timeout where as excessive CPU usage in reclaim context would select a larger timeout. Ideally a large value would always be used and the wakeups would occur before a timeout but that requires careful testing. Link: Signed-off-by: Mel Gorman <> Acked-by: Vlastimil Babka <> Cc: Andreas Dilger <> Cc: "Darrick J . Wong" <> Cc: Dave Chinner <> Cc: Johannes Weiner <> Cc: Jonathan Corbet <> Cc: Matthew Wilcox <> Cc: Michal Hocko <> Cc: NeilBrown <> Cc: Rik van Riel <> Cc: "Theodore Ts'o" <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/internal.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 7dfe74f827bf..f3de3a2f3e30 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -130,8 +130,7 @@ extern unsigned long highest_memmap_pfn;
extern int isolate_lru_page(struct page *page);
extern void putback_lru_page(struct page *page);
-extern void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason,
- long timeout);
+extern void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason);
* in mm/rmap.c: