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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 25 May 2024 08:41:28 +0200
From: Mike Galbraith <efault@....de>
To: Chunxin Zang <spring.cxz@...il.com>, mingo@...hat.com,
 peterz@...radead.org,  juri.lelli@...hat.com, vincent.guittot@...aro.org
Cc: dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com, 
	mgorman@...e.de, bristot@...hat.com, vschneid@...hat.com, 
	linux-kernel@...r.kernel.org, yu.c.chen@...el.com, yangchen11@...iang.com, 
	zhouchunhua@...iang.com, zangchunxin@...iang.com
Subject: Re: [PATCH] sched/fair: Reschedule the cfs_rq when current is
 ineligible

On Fri, 2024-05-24 at 21:40 +0800, Chunxin Zang wrote:
> I found that some tasks have been running for a long enough time and
> have become illegal, but they are still not releasing the CPU. This
> will increase the scheduling delay of other processes. Therefore, I
> tried checking the current process in wakeup_preempt and entity_tick,
> and if it is illegal, reschedule that cfs queue.

My box gave making the XXX below reality a two thumbs up when fiddling
with the original unfettered and a bit harsh RUN_TO_PARITY.

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8a5b1ae0aa55..922834f172b0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8413,12 +8413,13 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
 	update_curr(cfs_rq);

 	/*
-	 * XXX pick_eevdf(cfs_rq) != se ?
+	 * Run @curr until it is no longer our best option.  Basing the preempt
+	 * decision on @curr reselection puts any previous decisions back on the
+	 * table in context "now", including granularity preservation decisions
+	 * by RUN_TO_PARITY.
 	 */
-	if (pick_eevdf(cfs_rq) == pse)
-		goto preempt;
-
-	return;
+	if (pick_eevdf(cfs_rq) == se)
+		return;

 preempt:
 	resched_curr(rq);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ