linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] mm: page_alloc: fixes for early oom kills
@ 2023-11-05 12:50 Charan Teja Kalla
  2023-11-05 12:50 ` [PATCH V2 1/3] mm: page_alloc: unreserve highatomic page blocks before oom Charan Teja Kalla
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Charan Teja Kalla @ 2023-11-05 12:50 UTC (permalink / raw)
  To: akpm, mgorman, mhocko, david, vbabka, hannes, quic_pkondeti
  Cc: linux-mm, linux-kernel, Charan Teja Kalla

Ealry OOM is happened on a system with out unreserving the highatomic
page blocks and draining of pcp lists for an allocation request.

The state of the system where this issue exposed shown in oom kill logs:
[  295.998653] Normal free:7728kB boost:0kB min:804kB low:1004kB
high:1204kB reserved_highatomic:8192KB active_anon:4kB inactive_anon:0kB
active_file:24kB inactive_file:24kB unevictable:1220kB writepending:0kB
present:70732kB managed:49224kB mlocked:0kB bounce:0kB free_pcp:688kB
local_pcp:492kB free_cma:0kB
[  295.998656] lowmem_reserve[]: 0 32
[  295.998659] Normal: 508*4kB (UMEH) 241*8kB (UMEH) 143*16kB (UMEH)
33*32kB (UH) 7*64kB (UH) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB
0*4096kB = 7752kB

From the above log:
a) OOM is occurred with out unreserving the high atomic page blocks.
b) ~16MB of memory reserved for high atomic reserves against the 
expectation of 1% reserves.

These 2 issues are tried to be fixed in 1st and 2nd patch.

Another excerpt from the oom kill message:
Normal free:760kB boost:0kB min:768kB low:960kB high:1152kB
reserved_highatomic:0KB managed:49152kB free_pcp:460kB

In the above, pcp lists too aren't drained before entering into
oom kill path. This is tried to be fixed in 3rd patch.

Changes in V1:
 o Unreserving the high atomic page blocks is tried to fix from
   the oom kill path rather than in should_reclaim_retry()
 o discussed why a lot more than 1% of managed memory is reserved
   for high atomic reserves.
 o https://lore.kernel.org/linux-mm/1698669590-3193-1-git-send-email-quic_charante@quicinc.com/

Charan Teja Kalla (3):
  mm: page_alloc: unreserve highatomic page blocks before oom
  mm: page_alloc: correct high atomic reserve calculations
  mm: page_alloc: drain pcp lists before oom kill

 mm/page_alloc.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

-- 
2.7.4



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

end of thread, other threads:[~2024-02-06 23:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 12:50 [PATCH V2 0/3] mm: page_alloc: fixes for early oom kills Charan Teja Kalla
2023-11-05 12:50 ` [PATCH V2 1/3] mm: page_alloc: unreserve highatomic page blocks before oom Charan Teja Kalla
2023-11-09 10:29   ` Michal Hocko
2023-11-05 12:50 ` [PATCH V2 2/3] mm: page_alloc: correct high atomic reserve calculations Charan Teja Kalla
2023-11-16  9:59   ` Mel Gorman
2023-11-16 12:52     ` Michal Hocko
2023-11-17 16:19       ` Mel Gorman
2023-11-05 12:50 ` [PATCH V3 3/3] mm: page_alloc: drain pcp lists before oom kill Charan Teja Kalla
2023-11-05 12:55   ` Charan Teja Kalla
2023-11-09 10:33   ` Michal Hocko
2023-11-10 16:36     ` Charan Teja Kalla
2023-11-14 10:48       ` Michal Hocko
2023-11-14 16:36         ` Charan Teja Kalla
2023-11-15 14:09           ` Michal Hocko
2023-11-16  6:00             ` Charan Teja Kalla
2023-11-16 12:55               ` Michal Hocko
2023-11-17  5:43                 ` Charan Teja Kalla
2024-01-25 16:36           ` Zach O'Keefe
2024-01-26 10:47             ` Charan Teja Kalla
2024-01-26 10:57               ` Michal Hocko
2024-01-26 22:51                 ` Zach O'Keefe
2024-01-29 15:04                   ` Michal Hocko
2024-02-06 23:15                     ` Zach O'Keefe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).