On Wed, May 31, 2023 at 05:51:59PM +0200, Borislav Petkov wrote: > On Fri, May 19, 2023 at 02:14:26AM +0300, Kirill A. Shutemov wrote: > > The patch implements #1 and #2 for now. #2 is the default. Some > > s/This patch implements/Implement/ > > > workloads may want to use #1 with accept_memory=eager in kernel > > command line. #3 can be implemented later based on user's demands. > > All this remaining text should not talk about what is being done > - that's in the diff - but why. Drop the "what" pls. Does it look okay? Implement #1 and #2 for now. #2 is the default. Some workloads may want to use #1 with accept_memory=eager in kernel command line. #3 can be implemented later based on user's demands. Support of unaccepted memory requires a few changes in core-mm code: - memblock accepts memory on allocation. It serves early boot memory allocations and doesn't limit them to pre-accepted pool of memory. - page allocator accepts memory on the first allocation of the page. When kernel runs out of accepted memory, it accepts memory until the high watermark is reached. It helps to minimize fragmentation. EFI code will provide two helpers if the platform supports unaccepted memory: - accept_memory() makes a range of physical addresses accepted. - range_contains_unaccepted_memory() checks anything within the range of physical addresses requires acceptance. -- Kiryl Shutsemau / Kirill A. Shutemov