All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] powerpc/fadump: handle CMA activation failure appropriately
@ 2022-01-12 19:33 ` Hari Bathini
  0 siblings, 0 replies; 12+ messages in thread
From: Hari Bathini @ 2022-01-12 19:33 UTC (permalink / raw)
  To: akpm, david, linux-mm, mpe, linuxppc-dev
  Cc: osalvador, mike.kravetz, mahesh, sourabhjain, Hari Bathini

While commit a4e92ce8e4c8 ("powerpc/fadump: Reservationless firmware
assisted dump"), introduced Linux kernel's Contiguous Memory Allocator
(CMA) based reservation for fadump, it came with the assumption that
the memory remains reserved even if CMA activation fails. It ensures
no kernel pages reside in the reserved memory region, which can't be
mapped into the /proc/vmcore.

But commit 072355c1cf2d ("mm/cma: expose all pages to the buddy if
activation of an area fails") started returning all pages to buddy
allocator if CMA activation fails. This led to warning messages like
below while running crash-utility on vmcore of a kernel having above
two commits:

  crash: seek error: kernel virtual address: <from reserved region>

as reserved memory region ended up having kernel pages crash-utility
was looking for. Fix this by introducing an option in CMA, to opt out
from exposing pages to buddy allocator, on CMA activation failure.

Changes in v2:
* Replaced cma->free_pages_on_error with cma->reserve_pages_on_error
  & cma_dont_free_pages_on_error() with cma_reserve_pages_on_error()
  to avoid confusion and make the expectation on failure clearer.


Hari Bathini (2):
  mm/cma: provide option to opt out from exposing pages on activation
    failure
  powerpc/fadump: opt out from freeing pages on cma activation failure

 arch/powerpc/kernel/fadump.c |  6 ++++++
 include/linux/cma.h          |  2 ++
 mm/cma.c                     | 15 +++++++++++++--
 mm/cma.h                     |  1 +
 4 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2022-01-17  8:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 19:33 [PATCH v2 0/2] powerpc/fadump: handle CMA activation failure appropriately Hari Bathini
2022-01-12 19:33 ` Hari Bathini
2022-01-12 19:33 ` [PATCH v2 1/2] mm/cma: provide option to opt out from exposing pages on activation failure Hari Bathini
2022-01-12 19:33   ` Hari Bathini
2022-01-13  8:30   ` David Hildenbrand
2022-01-13  8:30     ` David Hildenbrand
2022-01-17  7:59     ` Hari Bathini
2022-01-17  7:59       ` Hari Bathini
2022-01-12 19:33 ` [PATCH v2 2/2] powerpc/fadump: opt out from freeing pages on cma " Hari Bathini
2022-01-12 19:33   ` Hari Bathini
2022-01-13  8:31   ` David Hildenbrand
2022-01-13  8:31     ` David Hildenbrand

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.