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-next>] [day] [month] [year] [list]
Message-Id: <20190603044309.168065-1-liangyan.peng@linux.alibaba.com>
Date:   Mon,  3 Jun 2019 12:43:09 +0800
From:   Liangyan <liangyan.peng@...ux.alibaba.com>
To:     mingo@...hat.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org
Cc:     yun.wang@...ux.alibaba.com, shanpeic@...ux.alibaba.com,
        xlpang@...ux.alibaba.com,
        "liangyan.ply" <liangyan.ply@...ux.alibaba.com>,
        Liangyan <liangyan.peng@...ux.alibaba.com>
Subject: [PATCH] sched/fair: don't restart enqueued cfs quota slack timer

From: "liangyan.ply" <liangyan.ply@...ux.alibaba.com>

start_cfs_slack_bandwidth() will restart the quota slack timer,
if it is called frequently, this timer will be restarted continuously
and may have no chance to expire to unthrottle cfs tasks.
This will cause that the throttled tasks can't be unthrottled in time
although they have remaining quota.

Signed-off-by: Liangyan <liangyan.peng@...ux.alibaba.com>
---
 kernel/sched/fair.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d90a64620072..fdb03c752f97 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4411,9 +4411,11 @@ static void start_cfs_slack_bandwidth(struct cfs_bandwidth *cfs_b)
 	if (runtime_refresh_within(cfs_b, min_left))
 		return;
 
-	hrtimer_start(&cfs_b->slack_timer,
+	if (!hrtimer_active(&cfs_b->slack_timer)) {
+		hrtimer_start(&cfs_b->slack_timer,
 			ns_to_ktime(cfs_bandwidth_slack_period),
 			HRTIMER_MODE_REL);
+	}
 }
 
 /* we know any runtime found here is valid as update_curr() precedes return */
-- 
2.14.4.44.g2045bb6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ