* [merged mm-stable] mm-page_alloc-enforce-minimum-zone-size-to-do-high-atomic-reserves.patch removed from -mm tree
@ 2023-12-11 0:55 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-12-11 0:55 UTC (permalink / raw)
To: mm-commits, vbabka, rientjes, quic_pkondeti, mhocko, mgorman,
hannes, david, quic_charante, akpm
The quilt patch titled
Subject: mm: page_alloc: enforce minimum zone size to do high atomic reserves
has been removed from the -mm tree. Its filename was
mm-page_alloc-enforce-minimum-zone-size-to-do-high-atomic-reserves.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Charan Teja Kalla <quic_charante@quicinc.com>
Subject: mm: page_alloc: enforce minimum zone size to do high atomic reserves
Date: Fri, 24 Nov 2023 16:35:53 +0530
Highatomic reserves are set to roughly 1% of zone for maximum and a
pageblock size for minimum. Encountered a system with the below
configuration:
Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB
reserved_highatomic:8192KB managed:49224kB
On such systems, even a single pageblock makes highatomic reserves are set
to ~8% of the zone memory. This high value can easily exert pressure on
the zone.
Per discussion with Michal and Mel, it is not much useful to reserve the
memory for highatomic allocations on such small systems[1]. Since the
minimum size for high atomic reserves is always going to be a pageblock
size and if 1% of zone managed pages is going to be below pageblock size,
don't reserve memory for high atomic allocations. Thanks Michal for this
suggestion[2].
Since no memory is being reserved for high atomic allocations and if
respective allocation failures are seen, this patch can be reverted.
[1] https://lore.kernel.org/linux-mm/20231117161956.d3yjdxhhm4rhl7h2@techsingularity.net/
[2] https://lore.kernel.org/linux-mm/ZVYRJMUitykepLRy@tiehlicka/
Link: https://lkml.kernel.org/r/c3a2a48e2cfe08176a80eaf01c110deb9e918055.1700821416.git.quic_charante@quicinc.com
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_alloc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/mm/page_alloc.c~mm-page_alloc-enforce-minimum-zone-size-to-do-high-atomic-reserves
+++ a/mm/page_alloc.c
@@ -1881,9 +1881,12 @@ static void reserve_highatomic_pageblock
/*
* The number reserved as: minimum is 1 pageblock, maximum is
- * roughly 1% of a zone.
+ * roughly 1% of a zone. But if 1% of a zone falls below a
+ * pageblock size, then don't reserve any pageblocks.
* Check is race-prone but harmless.
*/
+ if ((zone_managed_pages(zone) / 100) < pageblock_nr_pages)
+ return;
max_managed = ALIGN((zone_managed_pages(zone) / 100), pageblock_nr_pages);
if (zone->nr_reserved_highatomic >= max_managed)
return;
_
Patches currently in -mm which might be from quic_charante@quicinc.com are
mm-sparsemem-fix-race-in-accessing-memory_section-usage.patch
mm-sparsemem-fix-race-in-accessing-memory_section-usage-v2.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-11 0:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-11 0:55 [merged mm-stable] mm-page_alloc-enforce-minimum-zone-size-to-do-high-atomic-reserves.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.