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: <YbH08Nw3WpyxElE9@hirez.programming.kicks-ass.net>
Date:   Thu, 9 Dec 2021 13:22:08 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Honglei Wang <wanghonglei@...ichuxing.com>
Cc:     Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        linux-kernel@...r.kernel.org,
        Huaixin Chang <changhuaixin@...ux.alibaba.com>,
        Honglei Wang <jameshongleiwang@....com>
Subject: Re: [PATCH v2 1/3] sched/fair: avoid burst statistic if it's not set

On Wed, Dec 08, 2021 at 10:50:18PM +0800, Honglei Wang wrote:
> It's not necessary to do burst associated statistic and calculation for
> runtime if the burst feature is not set at all. Just return at the very
> start point if so.
> 
> Signed-off-by: Honglei Wang <wanghonglei@...ichuxing.com>
> ---
>  kernel/sched/fair.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 6e476f6d9435..2cd626c22912 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4640,6 +4640,11 @@ void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b)
>  	if (unlikely(cfs_b->quota == RUNTIME_INF))
>  		return;
>  
> +	if (cfs_b->burst == 0 && cfs_b->runtime_snap == cfs_b->quota) {
> +		cfs_b->runtime = cfs_b->quota;
> +		return;
> +	}
> +
>  	cfs_b->runtime += cfs_b->quota;
>  	runtime = cfs_b->runtime_snap - cfs_b->runtime;
>  	if (runtime > 0) {

What actual purpose does this patch serve, other than to increase the
line-count?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ