Message ID | 20241219164425.2277022-1-kevin.brodsky@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | Account page tables at all levels | expand |
On 12/19/24 08:44, Kevin Brodsky wrote: > +---------------+-------------------------+-----------------------+--------------+------------------------------------+ > | x86 | Y | Y | Y/N | kmem_cache at pgd level if PAE | > +---------------+-------------------------+-----------------------+--------------+------------------------------------+ This is a really rare series that adds functionality _and_ removes code overall. It looks really good to me. The x86 implementation seems to be captured just fine in the generic one: Acked-by: Dave Hansen <dave.hansen@linux.intel.com> One super tiny nit is that the PAE pgd _can_ be allocated using __get_free_pages(). It was originally there for Xen, but I think it's being used for PTI only at this point and the comments are wrong-ish. I kinda think we should just get rid of the 32-bit kmem_cache entirely.
On 19/12/2024 18:13, Dave Hansen wrote: > On 12/19/24 08:44, Kevin Brodsky wrote: >> +---------------+-------------------------+-----------------------+--------------+------------------------------------+ >> | x86 | Y | Y | Y/N | kmem_cache at pgd level if PAE | >> +---------------+-------------------------+-----------------------+--------------+------------------------------------+ > This is a really rare series that adds functionality _and_ removes code > overall. It looks really good to me. The x86 implementation seems to be > captured just fine in the generic one: Thank you for the review, very appreciated! > Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Just to double-check, are your ack'ing the x86 changes specifically? If so I'll add your Acked-by on patch 6, 7 and 9. > One super tiny nit is that the PAE pgd _can_ be allocated using > __get_free_pages(). It was originally there for Xen, but I think it's > being used for PTI only at this point and the comments are wrong-ish. > > I kinda think we should just get rid of the 32-bit kmem_cache entirely. That would certainly simplify things on the x86 side! I'm not at all familiar with that code though, would you be happy with providing a patch? I could add it to this series if that's convenient. - Kevin
On 12/20/24 02:58, Kevin Brodsky wrote: >> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> > Just to double-check, are your ack'ing the x86 changes specifically? If > so I'll add your Acked-by on patch 6, 7 and 9. Feel free to add it to each patch in the series.
On 12/20/24 02:58, Kevin Brodsky wrote: >> One super tiny nit is that the PAE pgd _can_ be allocated using >> __get_free_pages(). It was originally there for Xen, but I think it's >> being used for PTI only at this point and the comments are wrong-ish. >> >> I kinda think we should just get rid of the 32-bit kmem_cache entirely. > That would certainly simplify things on the x86 side! I'm not at all > familiar with that code though, would you be happy with providing a > patch? I could add it to this series if that's convenient. I hacked this together yesterday: > https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git/log/?h=simplify-pae-20241220 It definitely needs some more work. I'm particularly still puzzling about why SHARED_KERNEL_PMD is used both as a trigger for 32b vs. PAGE_SIZE PAE pgd allocations _and_ for the actual PMD sharing. Xen definitely needed the whole page behavior but I'm not sure why PTI did. Either way, that series should make the PAE PGDs a _bit_ less weird at the cost of an extra ~2 pages per process for folks who are running 32-bit PAE kernels with PTI disabled. But I think the diffstat is worth it: 5 files changed, 16 insertions(+), 96 deletions(-)