Skip to content

KVM: x86/mmu: Micro-optimize TDP MMU cond_resched()

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: x86/mmu: Check yielded_gfn for forward progress iff resched is neededarch/x86/kvm/mmu/tdp_mmu.c+14 -141 reply
2/2KVM: x86/mmu: Demote the WARN on yielded in xxx_cond_resched() to KVM_MMU_WARN_ONarch/x86/kvm/mmu/tdp_mmu.c+1 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJames Houghton
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: x86/mmu: Micro-optimize TDP MMU cond_resched()

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

Signature · 1 line
2.47.0.163.g1226f6d8fa-goog