From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
David Matlack <dmatlack@google.com>
Subject: [PATCH 0/2] KVM: x86/mmu: Micro-optimize TDP MMU cond_resched()
Date: Thu, 31 Oct 2024 10:06:31 -0700 [thread overview]
Message-ID: <20241031170633.1502783-1-seanjc@google.com> (raw)
Invert the order of checks in tdp_mmu_iter_cond_resched() so that the common
case (no resched needed) is checked first, and opportunsitically clean up a
wart where the helper would return "yielded" in an error path, even if that
invocation didn't actually yield. The latter cleanup allows extracting the
base "need resched" logic to a separate helper.
Note, I "speculatively" pushed these patches to kvm-x86 mmu, as they are
effectively needed for David's series to optimize hugepage recovery when
disabling dirty logging. I'll rework the commits sometime next weeks, e.g.
fix a few changelog typos (I found two, so far), to capture reviews, and
add Links. And if there are problems, I'll yank you the entire series
(David's and mine).
012a5c17cba4d165961a4643c5e10a151f003733 KVM: x86/mmu: Demote the WARN on yielded in xxx_cond_resched() to KVM_MMU_WARN_ON
d400ce271d9c555a93e38fb36ecb2d3bd60b234c KVM: x86/mmu: Check yielded_gfn for forward progress iff resched is needed
Sean Christopherson (2):
KVM: x86/mmu: Check yielded_gfn for forward progress iff resched is
needed
KVM: x86/mmu: Demote the WARN on yielded in xxx_cond_resched() to
KVM_MMU_WARN_ON
arch/x86/kvm/mmu/tdp_mmu.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
base-commit: 5cb1659f412041e4780f2e8ee49b2e03728a2ba6
--
2.47.0.163.g1226f6d8fa-goog
next reply other threads:[~2024-10-31 17:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 17:06 Sean Christopherson [this message]
2024-10-31 17:06 ` [PATCH 1/2] KVM: x86/mmu: Check yielded_gfn for forward progress iff resched is needed Sean Christopherson
2024-10-31 18:48 ` James Houghton
2024-10-31 17:06 ` [PATCH 2/2] KVM: x86/mmu: Demote the WARN on yielded in xxx_cond_resched() to KVM_MMU_WARN_ON Sean Christopherson
2024-11-05 5:56 ` [PATCH 0/2] KVM: x86/mmu: Micro-optimize TDP MMU cond_resched() Sean Christopherson
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=20241031170633.1502783-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox