Commit f7ec104
mm/page_alloc: fix counting of managed_pages
commit f636615 ("mm/page_alloc.c: clear out zone->lowmem_reserve[] if
the zone is empty") clears out zone->lowmem_reserve[] if zone is empty.
But when zone is not empty and sysctl_lowmem_reserve_ratio[i] is set to
zero, zone_managed_pages(zone) is not counted in the managed_pages either.
This is inconsistent with the description of lowmem_reserve, so fix it.
Link: https://lkml.kernel.org/r/20210527125707.3760259-1-liushixin2@huawei.com
Fixes: f636615 ("mm/page_alloc.c: clear out zone->lowmem_reserve[] if the zone is empty")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reported-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent e47aa90 commit f7ec104
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8240 | 8240 | | |
8241 | 8241 | | |
8242 | 8242 | | |
8243 | | - | |
8244 | | - | |
8245 | | - | |
8246 | | - | |
| 8243 | + | |
| 8244 | + | |
| 8245 | + | |
8247 | 8246 | | |
8248 | | - | |
| 8247 | + | |
| 8248 | + | |
| 8249 | + | |
8249 | 8250 | | |
8250 | | - | |
8251 | 8251 | | |
8252 | 8252 | | |
8253 | 8253 | | |
| |||
0 commit comments