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:	Tue, 10 Dec 2013 15:02:19 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Alex Shi <alex.shi@...aro.org>
Cc:	mingo@...hat.com, peterz@...radead.org, morten.rasmussen@....com,
	vincent.guittot@...aro.org, daniel.lezcano@...aro.org,
	linux@....linux.org.uk, tony.luck@...el.com, fenghua.yu@...el.com,
	tglx@...utronix.de, akpm@...ux-foundation.org,
	arjan@...ux.intel.com, pjt@...gle.com, fengguang.wu@...el.com,
	james.hogan@...tec.com, jason.low2@...com, viresh.kumar@...aro.org,
	hanjun.guo@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] nohz_full: update cpu load fix in nohz_full

On Tue, Dec 03, 2013 at 08:35:12PM +0800, Alex Shi wrote:
> We are not always 0 when update nohz cpu load, after nohz_full enabled.
> But current code still treat the cpu as idle. that is incorrect.
> Fix it to use correct cpu_load.
> 
> Signed-off-by: Alex Shi <alex.shi@...aro.org>
> ---
>  kernel/sched/proc.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/proc.c b/kernel/sched/proc.c
> index 16f5a30..f1441f0 100644
> --- a/kernel/sched/proc.c
> +++ b/kernel/sched/proc.c
> @@ -568,8 +568,14 @@ void update_cpu_load_nohz(void)
>  		/*
>  		 * We were idle, this means load 0, the current load might be
>  		 * !0 due to remote wakeups and the sort.
> +		 * or we may has only one task and in NO_HZ_FULL, then still use
> +		 * normal cpu load.
>  		 */
> -		__update_cpu_load(this_rq, 0, pending_updates);
> +		if (this_rq->cfs.h_nr_running) {
> +			unsigned load = get_rq_runnable_load(this_rq);
> +			__update_cpu_load(this_rq, load, pending_updates);
> +		} else
> +			__update_cpu_load(this_rq, 0, pending_updates);

But decay_load_missed() doesnt handle non 0 loads, right? It probably make more sense
to first fix __update_cpu_load() to make it handle this kind of thing before fixing the caller.

Now you had patches that remove the cpu_load secondary idx I think? You should move this patch to
that series.

>  	}
>  	raw_spin_unlock(&this_rq->lock);
>  }
> -- 
> 1.8.1.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ