On Mon, Oct 20, 2025 at 4:03 AM Mike Rapoport rppt@kernel.org wrote:
On Sat, Oct 18, 2025 at 01:17:55PM -0400, Pasha Tatashin wrote:
Metadata is preserved via 512-bytes, which requires using slabs. Slabs
KHO memory preservation metadata is preserved in 512 byte chunks which requires their allocation from slab allocator.
done
are not safe to be used with KHO because of kfence, and because partial
Please add more details why kfence is not safe here.
Done.
slabs may lead leaks to the next kernel. Change the size to be PAGE_SIZE.
While this change could potentially increase metadata overhead on systems with sparsely preserved memory, this is being mitigated by ongoing work to reduce sparseness during preservation via 1G guest pages. Furthermore, this change aligns with future work on a stateless KHO, which will also use page-sized bitmaps for its radix tree metadata.
With the stateless memory preservation there would be no problem with kfence, right? Maybe we should accelerate the stateless preservation work?
They are orthogonal, theoretically radix tree could still use the 512-bit bitmaps, but we chose to use page size. Also, Statless KHO still requires some work, and because it requires removing the notifiers, it is better if it is based it on top of the other LUO prep patches.
Signed-off-by: Pasha Tatashin pasha.tatashin@soleen.com
-- Sincerely yours, Mike.