From: "Li,Rongqing" <lirongqing@baidu.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Wanpeng Li <kernellwp@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>, kvm <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: 答复: 答复: [PATCH] KVM: Consider SMT idle status when halt polling
Date: Tue, 27 Jul 2021 06:39:58 +0000 [thread overview]
Message-ID: <e68a267a328648c484132bafd022671c@baidu.com> (raw)
In-Reply-To: <YP9gkSk+CHdKLP/Q@google.com>
> -----邮件原件-----
> 发件人: Sean Christopherson <seanjc@google.com>
> 发送时间: 2021年7月27日 9:26
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: Wanpeng Li <kernellwp@gmail.com>; Paolo Bonzini
> <pbonzini@redhat.com>; Ingo Molnar <mingo@redhat.com>; Peter Zijlstra
> <peterz@infradead.org>; kvm <kvm@vger.kernel.org>; LKML
> <linux-kernel@vger.kernel.org>
> 主题: Re: 答复: [PATCH] KVM: Consider SMT idle status when halt polling
>
> Rather than disallowing halt-polling entirely, on x86 it should be sufficient to
> simply have the hardware thread yield to its sibling(s) via PAUSE. It probably
> won't get back all performance, but I would expect it to be close.
>
> This compiles on all KVM architectures, and AFAICT the intended usage of
> cpu_relax() is identical for all architectures.
>
Reasonable, thanks, I will resend it
-Li
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index
> 6980dabe9df5..a07ecb3c67fb 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -3111,6 +3111,7 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
> goto out;
> }
> poll_end = cur = ktime_get();
> + cpu_relax();
> } while (kvm_vcpu_can_poll(cur, stop));
> }
>
next prev parent reply other threads:[~2021-07-27 6:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 3:58 [PATCH] KVM: Consider SMT idle status when halt polling Li RongQing
2021-07-22 4:15 ` Mika Penttilä
2021-07-22 5:22 ` 答复: " Li,Rongqing
2021-07-22 5:55 ` Wanpeng Li
2021-07-22 7:10 ` 答复: " Li,Rongqing
2021-07-22 12:16 ` Li,Rongqing
2021-07-27 1:25 ` Sean Christopherson
2021-07-27 6:39 ` Li,Rongqing [this message]
2021-07-22 13:35 ` kernel test robot
2021-07-22 13:35 ` kernel test robot
2021-07-22 14:52 ` kernel test robot
2021-07-22 14:52 ` kernel test robot
2021-07-22 15:07 ` Dongli Zhang
2021-07-22 15:20 ` Dongli Zhang
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=e68a267a328648c484132bafd022671c@baidu.com \
--to=lirongqing@baidu.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.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.