diff options
| author | Davidlohr Bueso <dave@stgolabs.net> | 2025-06-23 11:58:49 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-07-19 18:59:52 -0700 |
| commit | 2b7226af730cc9a8818ff3b39aabcd76861913dd (patch) | |
| tree | 464c124cc406f839677e4d517aaee5996eca43b8 /mm/internal.h | |
| parent | 7a92f4f591770cf77de2e6550f4a68957483b739 (diff) | |
mm/memcg: make memory.reclaim interface generic
This adds a general call for both parsing as well as the common reclaim
semantics. memcg is still the only user and no change in semantics.
[akpm@linux-foundation.org: fix CONFIG_NUMA=n build]
Link: https://lkml.kernel.org/r/20250623185851.830632-3-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
| -rw-r--r-- | mm/internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h index 91773a0ef305..5b0f71e5434b 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -533,6 +533,16 @@ extern unsigned long highest_memmap_pfn; bool folio_isolate_lru(struct folio *folio); void folio_putback_lru(struct folio *folio); extern void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason); +#ifdef CONFIG_NUMA +int user_proactive_reclaim(char *buf, + struct mem_cgroup *memcg, pg_data_t *pgdat); +#else +static inline int user_proactive_reclaim(char *buf, + struct mem_cgroup *memcg, pg_data_t *pgdat) +{ + return 0; +} +#endif /* * in mm/rmap.c: |
