Commit 800f105
mm/page_alloc: fix memory accept before watermarks gets initialized
Watermarks are initialized during the postcore initcall. Until then, all
watermarks are set to zero. This causes cond_accept_memory() to
incorrectly skip memory acceptance because a watermark of 0 is always met.
This can lead to a premature OOM on boot.
To ensure progress, accept one MAX_ORDER page if the watermark is zero.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: dcdfdd4 ("mm: Add support for unaccepted memory")
Signed-off-by: Kirill A. Shutemov <[email protected]>
Tested-by: Farrah Chen <[email protected]>
Reported-by: Farrah Chen <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Pankaj Gupta <[email protected]>
Cc: Ashish Kalra <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: "Edgecombe, Rick P" <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: "Mike Rapoport (IBM)" <[email protected]>
Cc: Thomas Lendacky <[email protected]>
Cc: <[email protected]> [6.5+]
Signed-off-by: Andrew Morton <[email protected]>1 parent b9c0e49 commit 800f105
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7004 | 7004 | | |
7005 | 7005 | | |
7006 | 7006 | | |
7007 | | - | |
| 7007 | + | |
7008 | 7008 | | |
7009 | 7009 | | |
7010 | 7010 | | |
| |||
7013 | 7013 | | |
7014 | 7014 | | |
7015 | 7015 | | |
| 7016 | + | |
| 7017 | + | |
| 7018 | + | |
| 7019 | + | |
| 7020 | + | |
| 7021 | + | |
| 7022 | + | |
| 7023 | + | |
| 7024 | + | |
| 7025 | + | |
7016 | 7026 | | |
7017 | | - | |
| 7027 | + | |
7018 | 7028 | | |
7019 | 7029 | | |
7020 | 7030 | | |
| |||
0 commit comments