Commit 0c04015
mm/page_alloc: simplify lowmem_reserve max calculation
Use max() to find the maximum lowmem_reserve value and min_t() to cap it
to managed_pages in calculate_totalreserve_pages(), instead of open-coding
the comparisons. No functional change.
[liuye@kylinos.cn: fix layout, use min_t]
Link: https://lkml.kernel.org/r/20250815024509.37900-1-ye.liu@linux.dev
Link: https://lkml.kernel.org/r/20250814090053.22241-1-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent a3f451a commit 0c04015
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6236 | 6236 | | |
6237 | 6237 | | |
6238 | 6238 | | |
6239 | | - | |
6240 | | - | |
6241 | | - | |
6242 | | - | |
| 6239 | + | |
| 6240 | + | |
6243 | 6241 | | |
6244 | 6242 | | |
6245 | 6243 | | |
6246 | 6244 | | |
6247 | | - | |
6248 | | - | |
| 6245 | + | |
6249 | 6246 | | |
6250 | 6247 | | |
6251 | 6248 | | |
| |||
0 commit comments