linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6 v2] Discard __GFP_ATOMIC
@ 2023-01-09 15:16 Mel Gorman
  2023-01-09 15:16 ` [PATCH 1/7] mm/page_alloc: Rename ALLOC_HIGH to ALLOC_MIN_RESERVE Mel Gorman
                   ` (6 more replies)
  0 siblings, 7 replies; 34+ messages in thread
From: Mel Gorman @ 2023-01-09 15:16 UTC (permalink / raw)
  To: Linux-MM
  Cc: Andrew Morton, Michal Hocko, NeilBrown, Thierry Reding,
	Matthew Wilcox, Vlastimil Babka, LKML, Mel Gorman

Changelog since v1
o Split one patch						(vbabka)
o Improve OOM reserve handling					(vbabka)
o Fix __GFP_RECLAIM vs __GFP_DIRECT_RECLAIM			(vbabka)

Neil's patch has been residing in mm-unstable as commit 2fafb4fe8f7a
("mm: discard __GFP_ATOMIC") for a long time and recently brought up
again. Most recently, I was worried that __GFP_HIGH allocations could
use high-order atomic reserves which is unintentional but there was no
response so lets revisit -- this series reworks how min reserves are used,
protects highorder reserves and then finishes with Neil's patch with very
minor modifications so it fits on top.

There was a review discussion on renaming __GFP_DIRECT_RECLAIM to
__GFP_ALLOW_BLOCKING but I didn't think it was that big an issue and is
ortogonal to the removal of __GFP_ATOMIC.

There were some concerns about how the gfp flags affect the min reserves
but it never reached a solid conclusion so I made my own attempt.

The series tries to iron out some of the details on how reserves are
used. ALLOC_HIGH becomes ALLOC_MIN_RESERVE and ALLOC_HARDER becomes
ALLOC_NON_BLOCK and documents how the reserves are affected. For example,
ALLOC_NON_BLOCK (no direct reclaim) on its own allows 25% of the min reserve.
ALLOC_MIN_RESERVE (__GFP_HIGH) allows 50% and both combined allows deeper
access again. ALLOC_OOM allows access to 75%.

High-order atomic allocations are explicitly handled with the caveat that
no __GFP_ATOMIC flag means that any high-order allocation that specifies
GFP_HIGH and cannot enter direct reclaim will be treated as if it was
GFP_ATOMIC.

 Documentation/mm/balance.rst   |   2 +-
 drivers/iommu/tegra-smmu.c     |   4 +-
 include/linux/gfp_types.h      |  12 ++--
 include/trace/events/mmflags.h |   1 -
 lib/test_printf.c              |   8 +--
 mm/internal.h                  |  15 ++++-
 mm/page_alloc.c                | 103 ++++++++++++++++++++-------------
 tools/perf/builtin-kmem.c      |   1 -
 8 files changed, 86 insertions(+), 60 deletions(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2023-01-16 10:29 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 15:16 [PATCH 0/6 v2] Discard __GFP_ATOMIC Mel Gorman
2023-01-09 15:16 ` [PATCH 1/7] mm/page_alloc: Rename ALLOC_HIGH to ALLOC_MIN_RESERVE Mel Gorman
2023-01-11 15:18   ` Michal Hocko
2023-01-12  9:26     ` Mel Gorman
2023-01-09 15:16 ` [PATCH 2/7] mm/page_alloc: Treat RT tasks similar to __GFP_HIGH Mel Gorman
2023-01-11 15:27   ` Michal Hocko
2023-01-12  9:36     ` Mel Gorman
2023-01-12  9:47       ` Michal Hocko
2023-01-12 16:42         ` Mel Gorman
2023-01-13  9:04       ` David Laight
2023-01-13 11:09         ` Mel Gorman
2023-01-09 15:16 ` [PATCH 3/7] mm/page_alloc: Explicitly record high-order atomic allocations in alloc_flags Mel Gorman
2023-01-10 15:28   ` Vlastimil Babka
2023-01-11 15:36   ` Michal Hocko
2023-01-12  9:38     ` Mel Gorman
2023-01-09 15:16 ` [PATCH 4/7] mm/page_alloc: Explicitly define what alloc flags deplete min reserves Mel Gorman
2023-01-11 14:04   ` Vlastimil Babka
2023-01-11 15:37   ` Michal Hocko
2023-01-09 15:16 ` [PATCH 5/7] mm/page_alloc.c: Allow __GFP_NOFAIL requests deeper access to reserves Mel Gorman
2023-01-11 14:05   ` Vlastimil Babka
2023-01-11 15:46   ` Michal Hocko
2023-01-12  9:43     ` Mel Gorman
2023-01-09 15:16 ` [PATCH 6/7] mm/page_alloc: Give GFP_ATOMIC and non-blocking allocations " Mel Gorman
2023-01-11 14:12   ` Vlastimil Babka
2023-01-11 15:58   ` Michal Hocko
2023-01-11 17:05     ` Mel Gorman
2023-01-12  8:11       ` Michal Hocko
2023-01-12  8:29         ` Michal Hocko
2023-01-12  9:24         ` Mel Gorman
2023-01-12  9:45           ` Michal Hocko
2023-01-14 22:10       ` NeilBrown
2023-01-16 10:29         ` Mel Gorman
2023-01-09 15:16 ` [PATCH 7/7] mm: discard __GFP_ATOMIC Mel Gorman
2023-01-12  8:12   ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox