lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e68a267a328648c484132bafd022671c@baidu.com>
Date:   Tue, 27 Jul 2021 06:39:58 +0000
From:   "Li,Rongqing" <lirongqing@...du.com>
To:     Sean Christopherson <seanjc@...gle.com>
CC:     Wanpeng Li <kernellwp@...il.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        kvm <kvm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: 答复: 答复: [PATCH] KVM: Consider SMT idle status when halt polling



> -----邮件原件-----
> 发件人: Sean Christopherson <seanjc@...gle.com>
> 发送时间: 2021年7月27日 9:26
> 收件人: Li,Rongqing <lirongqing@...du.com>
> 抄送: Wanpeng Li <kernellwp@...il.com>; Paolo Bonzini
> <pbonzini@...hat.com>; Ingo Molnar <mingo@...hat.com>; Peter Zijlstra
> <peterz@...radead.org>; kvm <kvm@...r.kernel.org>; LKML
> <linux-kernel@...r.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));
>         }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ