linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@redhat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	 Vincent Guittot <vincent.guittot@linaro.org>,
	Will Deacon <will@kernel.org>,
	linux-doc@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Valentin Schneider <valentin.schneider@arm.com>,
	 Marco Elver <elver@google.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	 David Matlack <dmatlack@google.com>,
	Friedrich Weber <f.weber@proxmox.com>,
	 Ankur Arora <ankur.a.arora@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2 0/2] sched/core: Fix spinlocks vs. PREEMPT_DYNAMIC=y
Date: Wed, 24 Apr 2024 13:08:25 -0700	[thread overview]
Message-ID: <ZilmuTJzyk7U-Kul@google.com> (raw)
In-Reply-To: <20240312193911.1796717-1-seanjc@google.com>

On Tue, Mar 12, 2024, Sean Christopherson wrote:
> Fix a bug in dynamic preemption where the kernel will yield contended
> spinlocks (and rwlocks) even if the selected preemption model is "none" or
> "voluntary".  I say "bug" because this divergence from PREEMPT_DYNAMIC=n
> behavior effectively broke existing KVM configurations, e.g. vCPUs would
> get stuck and become unresponsive for multiple seconds if there was heavy
> KSM or NUMA balancing activity in the host.
> 
> This isn't super urgent, as 6.8 has a fix in KVM for the over-aggressive
> yielding (commit d02c357e5bfa ("KVM: x86/mmu: Retry fault before acquiring
> mmu_lock if mapping is changing"), but I wouldn't be surprised if the
> behavior is causing other performance issues/regressions that are less
> severe and/or less visible.

Anyone have any thoughts on how to move this forward?  I have a hard time
believing no one has opinions on this code :-)

> v2:
>  - Rebase onto Linus' tree to deal with the code movement to spinlock.h.
>  - Opportunistically document the behavior.
>  - Add the PREEMPT_AUTO folks to Cc to get their eyeballs/input.
> 
> v1: https://lore.kernel.org/all/20240110214723.695930-1-seanjc@google.com
> 
> Sean Christopherson (2):
>   sched/core: Move preempt_model_*() helpers from sched.h to preempt.h
>   sched/core: Drop spinlocks on contention iff kernel is preemptible
> 
>  .../admin-guide/kernel-parameters.txt         |  4 +-
>  include/linux/preempt.h                       | 41 +++++++++++++++++++
>  include/linux/sched.h                         | 41 -------------------
>  include/linux/spinlock.h                      | 14 +++----
>  4 files changed, 50 insertions(+), 50 deletions(-)
> 
> 
> base-commit: b29f377119f68b942369a9366bdcb1fec82b2cda
> -- 
> 2.44.0.278.ge034bb2e1d-goog
> 

      parent reply	other threads:[~2024-04-24 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 19:39 [PATCH v2 0/2] sched/core: Fix spinlocks vs. PREEMPT_DYNAMIC=y Sean Christopherson
2024-03-12 19:39 ` [PATCH v2 1/2] sched/core: Move preempt_model_*() helpers from sched.h to preempt.h Sean Christopherson
2024-04-25  6:19   ` Ankur Arora
2024-03-12 19:39 ` [PATCH v2 2/2] sched/core: Drop spinlocks on contention iff kernel is preemptible Sean Christopherson
2024-04-25  6:18   ` Ankur Arora
2024-04-25  7:41   ` Chen Yu
2024-04-25 16:47     ` Sean Christopherson
2024-04-26  3:41       ` Chen Yu
2024-04-24 20:08 ` 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=ZilmuTJzyk7U-Kul@google.com \
    --to=seanjc@google.com \
    --cc=ankur.a.arora@oracle.com \
    --cc=corbet@lwn.net \
    --cc=dmatlack@google.com \
    --cc=elver@google.com \
    --cc=f.weber@proxmox.com \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=will@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).