All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Luiz Capitulino <luizcap@amazon.com>
Cc: stable@vger.kernel.org, lcapitulino@gmail.com,
	Li RongQing <lirongqing@baidu.com>,
	Yong He <zhuangel570@gmail.com>,
	Robert Hoo <robert.hoo.linux@gmail.com>,
	Kai Huang <kai.huang@intel.com>
Subject: Re: [PATH 6.4.y] KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages
Date: Tue, 5 Sep 2023 17:03:41 -0700	[thread overview]
Message-ID: <ZPfB3XGhP13xC9Ba@google.com> (raw)
In-Reply-To: <20230905145412.12011-1-luizcap@amazon.com>

On Tue, Sep 05, 2023, Luiz Capitulino wrote:
> From: Sean Christopherson <seanjc@google.com>
> 
> Commit 0b210faf337314e4bc88e796218bc70c72a51209 upstream.
> 
> Add a "never" option to the nx_huge_pages module param to allow userspace
> to do a one-way hard disabling of the mitigation, and don't create the
> per-VM recovery threads when the mitigation is hard disabled.  Letting
> userspace pinky swear that userspace doesn't want to enable NX mitigation
> (without reloading KVM) allows certain use cases to avoid the latency
> problems associated with spawning a kthread for each VM.
> 
> E.g. in FaaS use cases, the guest kernel is trusted and the host may
> create 100+ VMs per logical CPU, which can result in 100ms+ latencies when
> a burst of VMs is created.
> 
> Reported-by: Li RongQing <lirongqing@baidu.com>
> Closes: https://lore.kernel.org/all/1679555884-32544-1-git-send-email-lirongqing@baidu.com
> Cc: Yong He <zhuangel570@gmail.com>
> Cc: Robert Hoo <robert.hoo.linux@gmail.com>
> Cc: Kai Huang <kai.huang@intel.com>
> Reviewed-by: Robert Hoo <robert.hoo.linux@gmail.com>
> Acked-by: Kai Huang <kai.huang@intel.com>
> Tested-by: Luiz Capitulino <luizcap@amazon.com>
> Reviewed-by: Li RongQing <lirongqing@baidu.com>
> Link: https://lore.kernel.org/r/20230602005859.784190-1-seanjc@google.com
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Luiz Capitulino <luizcap@amazon.com>
> ---
>  arch/x86/kvm/mmu/mmu.c | 41 ++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 36 insertions(+), 5 deletions(-)
> 
> I submitted this backport for 6.1.y[1] but we agreed that having it for 6.4.y
> is desirable to allow upgrade path.

Heh, I would have personally just let 6.4 suffer, but since you went through the
effort:

Acked-by: Sean Christopherson <seanjc@google.com>

      reply	other threads:[~2023-09-06  0:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 14:54 [PATH 6.4.y] KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages Luiz Capitulino
2023-09-06  0:03 ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPfB3XGhP13xC9Ba@google.com \
    --to=seanjc@google.com \
    --cc=kai.huang@intel.com \
    --cc=lcapitulino@gmail.com \
    --cc=lirongqing@baidu.com \
    --cc=luizcap@amazon.com \
    --cc=robert.hoo.linux@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=zhuangel570@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.