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: <165062326204.4207.16036597032362236478.tip-bot2@tip-bot2>
Date:   Fri, 22 Apr 2022 10:27:42 -0000
From:   "tip-bot2 for Chengming Zhou" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Chengming Zhou <zhouchengming@...edance.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Ben Segall <bsegall@...gle.com>,
        Vincent Guittot <vincent.guittot@...aro.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/fair: Delete useless condition in tg_unthrottle_up()

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     0a00a354644ee1800d31c47cf5927b9b50272fac
Gitweb:        https://git.kernel.org/tip/0a00a354644ee1800d31c47cf5927b9b50272fac
Author:        Chengming Zhou <zhouchengming@...edance.com>
AuthorDate:    Fri, 08 Apr 2022 19:53:09 +08:00
Committer:     Peter Zijlstra <peterz@...radead.org>
CommitterDate: Fri, 22 Apr 2022 12:14:07 +02:00

sched/fair: Delete useless condition in tg_unthrottle_up()

We have tested cfs_rq->load.weight in cfs_rq_is_decayed(),
the first condition "!cfs_rq_is_decayed(cfs_rq)" is enough
to cover the second condition "cfs_rq->nr_running".

Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Ben Segall <bsegall@...gle.com>
Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>
Link: https://lore.kernel.org/r/20220408115309.81603-2-zhouchengming@bytedance.com
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f74b340..3eba0dc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4850,7 +4850,7 @@ static int tg_unthrottle_up(struct task_group *tg, void *data)
 					     cfs_rq->throttled_clock_pelt;
 
 		/* Add cfs_rq with load or one or more already running entities to the list */
-		if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
+		if (!cfs_rq_is_decayed(cfs_rq))
 			list_add_leaf_cfs_rq(cfs_rq);
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ