On 22/12/21 12:18 am, David Hildenbrand wrote:
On 20.12.21 20:34, Hari Bathini wrote:
Commit 072355c1cf2d ("mm/cma: expose all pages to the buddy if
activation of an area fails") started exposing all pages to buddy
allocator on CMA activation failure. But there can be CMA users that
want to handle the reserved memory differently on CMA allocation
failure. Provide an option to opt out from exposing pages to buddy
for such cases.
Hi David,
Sorry, I could not get back on this sooner. I went out on vacation
and missed this.
.
Can you elaborate why that is important and what the target user can
actually do with it?
Previously, firmware-assisted dump [1] used to reserve memory that it
needs for booting a capture kernel & offloading /proc/vmcore.
This memory is reserved, basically blocked from being used by
production kernel, to ensure kernel crash context is not lost on
booting into a capture kernel from this memory chunk.
But [2] started using CMA instead to let the memory be used at least
in some cases as long as this memory is not going to have kernel pages.
So, the intention in using CMA was to keep the memory unused if CMA
activation fails and only let it be used for some purpose, if at all,
if CMA activation succeeds. But [3] breaks that assumption reporting
weird errors on vmcore captured with fadump, when CMA activation fails.
To answer the question, fadump does not want the memory to be used for
kernel pages, if CMA activation fails...
[1]
https://github.com/torvalds/linux/blob/master/Documentation/powerpc/firmware-assisted-dump.rst
[2] https://github.com/torvalds/linux/commit/a4e92ce8e4c8
[3] https://github.com/torvalds/linux/commit/072355c1cf2d
Thanks
Hari