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]
Message-ID: <bd15822f364145228de8ad83a38c9d26@baidu.com>
Date:   Wed, 7 Dec 2022 03:45:03 +0000
From:   "Li,Rongqing" <lirongqing@...du.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        "Rafael J. Wysocki" <rafael@...nel.org>
CC:     "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "jpoimboe@...nel.org" <jpoimboe@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: RE: [PATCH] cpuidle-haltpoll: Disable kvm guest polling when
 mwait_idle is used



> -----Original Message-----
> From: Thomas Gleixner <tglx@...utronix.de>
> Sent: Tuesday, December 6, 2022 8:08 PM
> To: Rafael J. Wysocki <rafael@...nel.org>; Li,Rongqing <lirongqing@...du.com>
> Cc: mingo@...hat.com; bp@...en8.de; dave.hansen@...ux.intel.com;
> x86@...nel.org; rafael@...nel.org; daniel.lezcano@...aro.org;
> peterz@...radead.org; akpm@...ux-foundation.org; tony.luck@...el.com;
> jpoimboe@...nel.org; linux-kernel@...r.kernel.org; linux-pm@...r.kernel.org
> Subject: Re: [PATCH] cpuidle-haltpoll: Disable kvm guest polling when
> mwait_idle is used
> 
> On Tue, Dec 06 2022 at 12:59, Rafael J. Wysocki wrote:
> > On Tue, Dec 6, 2022 at 7:43 AM <lirongqing@...du.com> wrote:
> >>
> >> +bool is_mwait_idle(void)
> >> +{
> >> +       return x86_idle == mwait_idle; }
> >> +EXPORT_SYMBOL_GPL(is_mwait_idle);
> 
> No, this is just another adhoc check, which scratches ONE particular itch.
> 
> >> @@ -111,6 +112,9 @@ static int __init haltpoll_init(void)
> >>         if (!kvm_para_available() || !haltpoll_want())
> >>                 return -ENODEV;
> >>
> >> +       if (is_mwait_idle())
> >> +               return -ENODEV;
> >> +
> >
> > So perhaps you could make default_enter_idle() be a bit more careful
> > about what it calls as the "default idle" routine?
> 
> Correct. arch_cpu_idle() is the one which should be called.
> 

Greats,  using arch_cpu_idle() can get best latency,

Before change, "sockperf ping-pong -i 127.0.0.1 -p 20001  --tcp " latency is:
sockperf: Summary: Latency is 6.245 usec

this patch, disable cpuidle-haltpoll
sockperf: Summary: Latency is 4.671 usec


using arch_cpu_idle() in default_enter_idle()
sockperf: Summary: Latency is 4.285 usec


thanks

-LiRongQing


> Thanks,
> 
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ