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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Jun 2017 11:58:15 +0800
From:   Yang Zhang <yang.zhang.wz@...il.com>
To:     Paolo Bonzini <pbonzini@...hat.com>, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com
Cc:     x86@...nel.org, corbet@....net, tony.luck@...el.com, bp@...en8.de,
        peterz@...radead.org, mchehab@...nel.org,
        akpm@...ux-foundation.org, krzk@...nel.org, jpoimboe@...hat.com,
        luto@...nel.org, borntraeger@...ibm.com, thgarnie@...gle.com,
        rgerst@...il.com, minipli@...glemail.com,
        douly.fnst@...fujitsu.com, nicstange@...il.com, fweisbec@...il.com,
        dvlasenk@...hat.com, bristot@...hat.com,
        yamada.masahiro@...ionext.com, mika.westerberg@...ux.intel.com,
        yu.c.chen@...el.com, aaron.lu@...el.com, rostedt@...dmis.org,
        me@...ehuey.com, len.brown@...el.com, prarit@...hat.com,
        hidehiro.kawai.ez@...achi.com, fengtiantian@...wei.com,
        pmladek@...e.com, jeyu@...hat.com, Larry.Finger@...inger.net,
        zijun_hu@....com, luisbg@....samsung.com, johannes.berg@...el.com,
        niklas.soderlund+renesas@...natech.se, zlpnobody@...il.com,
        adobriyan@...il.com, fgao@...ai8.com, ebiederm@...ssion.com,
        subashab@...eaurora.org, arnd@...db.de, matt@...eblueprint.co.uk,
        mgorman@...hsingularity.net, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-edac@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH 2/2] x86/idle: use dynamic halt poll

On 2017/6/22 19:51, Paolo Bonzini wrote:
>
>
> On 22/06/2017 13:22, root wrote:
>>  ==============================================================
>>
>> +poll_grow: (X86 only)
>> +
>> +This parameter is multiplied in the grow_poll_ns() to increase the poll time.
>> +By default, the values is 2.
>> +
>> +==============================================================
>> +poll_shrink: (X86 only)
>> +
>> +This parameter is divided in the shrink_poll_ns() to reduce the poll time.
>> +By default, the values is 2.
>
> Even before starting the debate on whether this is a good idea or a bad
> idea, KVM reduces the polling value to the minimum (10 us) by default

I noticed it. It looks like the logic inside KVM is more reasonable. I 
will do more testing to compare the two.

> when polling fails.  Also, it shouldn't be bound to
> CONFIG_HYPERVISOR_GUEST, since there's nothing specific to virtual
> machines here.

Yes. The original idea to use CONFIG_HYPERVISOR_GUEST because this 
mechanism will only helpful inside VM. But as Thomas mentioned on other 
thread it is wrong to use it since most distribution kernel will set it 
to yes and still affect the bare metal. I will integrate it with 
paravirtualizaion part as you suggested in below.

>
> Regarding the good/bad idea part, KVM's polling is made much more
> acceptable by single_task_running().  At least you need to integrate it
> with paravirtualization.  If the VM is scheduled out, you shrink the
> polling period.  There is already vcpu_is_preempted for this, it is used
> by mutexes.

I have considered single_task_running() before. But since there is no 
such paravirtual interface currently and i am not sure whether it is a 
information leak from host if introducing such interface, so i didn't do 
it. Do you mean vcpu_is_preempted can do the same thing? I check the 
code and seems it only tells whether the VCPU is scheduled out or not 
which cannot satisfy the needs.

>
> Paolo
>


-- 
Yang
Alibaba Cloud Computing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ