lkml.org 
[lkml]   [2023]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v13 17/35] KVM: Add transparent hugepage support for dedicated guest memory
From
On 10/28/2023 2:21 AM, Sean Christopherson wrote:
> Extended guest_memfd to allow backing guest memory with transparent
> hugepages. Require userspace to opt-in via a flag even though there's no
> known/anticipated use case for forcing small pages as THP is optional,
> i.e. to avoid ending up in a situation where userspace is unaware that
> KVM can't provide hugepages.

Personally, it seems not so "transparent" if requiring userspace to opt-in.

People need to 1) check if the kernel built with TRANSPARENT_HUGEPAGE
support, or check is the sysfs of transparent hugepage exists; 2)get the
maximum support hugepage size 3) ensure the size satisfies the
alignment; before opt-in it.

Even simpler, userspace can blindly try to create guest memfd with
transparent hugapage flag. If getting error, fallback to create without
the transparent hugepage flag.

However, it doesn't look transparent to me.

\
 
 \ /
  Last update: 2023-10-31 09:38    [W:0.751 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site