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]
Date:   Mon, 23 May 2022 11:33:58 +0000
From:   Eiichi Tsukata <eiichi.tsukata@...anix.com>
To:     "rafael@...nel.org" <rafael@...nel.org>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "joao.m.martins@...cle.com" <joao.m.martins@...cle.com>,
        "mtosatti@...hat.com" <mtosatti@...hat.com>
Subject: Re: [PATCH] cpuidle: haltpoll: Add trace points for
 guest_halt_poll_ns grow/shrink



> On May 23, 2022, at 15:35, Eiichi Tsukata <eiichi.tsukata@...anix.com> wrote:
> 
> Add trace points as are implemented in KVM host halt polling.
> This helps tune guest halt polling params.
> 
> Signed-off-by: Eiichi Tsukata <eiichi.tsukata@...anix.com>
> ---
> drivers/cpuidle/governors/haltpoll.c |  7 +++++-
> include/trace/events/power.h         | 33 ++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpuidle/governors/haltpoll.c b/drivers/cpuidle/governors/haltpoll.c
> index cb2a96eafc02..9a6eca41a484 100644
> --- a/drivers/cpuidle/governors/haltpoll.c
> +++ b/drivers/cpuidle/governors/haltpoll.c
> @@ -19,6 +19,7 @@
> #include <linux/sched.h>
> #include <linux/module.h>
> #include <linux/kvm_para.h>
> +#include <trace/events/power.h>
> 
> static unsigned int guest_halt_poll_ns __read_mostly = 200000;
> module_param(guest_halt_poll_ns, uint, 0644);
> @@ -77,13 +78,14 @@ static int haltpoll_select(struct cpuidle_driver *drv,
> 
> static void adjust_poll_limit(struct cpuidle_device *dev, u64 block_ns)
> {
> -	unsigned int val;
> +	unsigned int val, old;
> 
> 	/* Grow cpu_halt_poll_us if
> 	 * cpu_halt_poll_us < block_ns < guest_halt_poll_us
> 	 */
> 	if (block_ns > dev->poll_limit_ns && block_ns <= guest_halt_poll_ns) {
> 		val = dev->poll_limit_ns * guest_halt_poll_grow;
> +		old = val;

This sets wrong old val. Will fix it in v2.

Eiichi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ