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, 14 Jun 2016 17:58:42 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>, Mike Galbraith <efault@....de>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/3] sched: Unloop sched avg decaying

On Tue, Jun 14, 2016 at 05:28:01PM +0200, Frederic Weisbecker wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 385c947..0c0578a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -666,17 +666,17 @@ bool sched_can_stop_tick(struct rq *rq)
>  void sched_avg_update(struct rq *rq)
>  {
>  	s64 period = sched_avg_period();
> +	s64 delta;
> +	u64 rem;
> +	int pending;
>  
> +	delta = (s64)(rq_clock(rq) - rq->age_stamp);
> +	if (delta <= period)
> +		return;
> +
> +	pending = div64_u64_rem(delta, period, &rem);
> +	rq->age_stamp += delta - rem;
> +	rq->rt_avg >>= pending;
>  }

Blergh, and now do the profile on machine that doesn't have major
transistor count dedicated to divisions.

Why not add the division to the nohz exit path only?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ