Re: [PATCHv3 02/17] mm/khugepaged: Do not collapse pages in encrypted VMAs

From: Kirill A. Shutemov
Date: Wed Jun 13 2018 - 16:18:10 EST


On Wed, Jun 13, 2018 at 05:50:24PM +0000, Dave Hansen wrote:
> On 06/12/2018 07:39 AM, Kirill A. Shutemov wrote:
> > Pages for encrypted VMAs have to be allocated in a special way:
> > we would need to propagate down not only desired NUMA node but also
> > whether the page is encrypted.
> >
> > It complicates not-so-trivial routine of huge page allocation in
> > khugepaged even more. It also puts more pressure on page allocator:
> > we cannot re-use pages allocated for encrypted VMA to collapse
> > page in unencrypted one or vice versa.
> >
> > I think for now it worth skipping encrypted VMAs. We can return
> > to this topic later.
>
> You're asking for this to be included, but without a major piece of THP
> support. Is THP support unimportant for this feature?
>
> Are we really asking the x86 maintainers to merge this feature with this
> restriction in place?

I gave it more thought after your comment and I think I see a way to get
khugepaged work with memory encryption.

Let me check it tomorrow.

--
Kirill A. Shutemov