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: <1430068258-1960-3-git-send-email-xlpang@126.com>
Date:	Mon, 27 Apr 2015 01:10:55 +0800
From:	Xunlei Pang <xlpang@....com>
To:	linux-kernel@...r.kernel.org
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Juri Lelli <juri.lelli@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Xunlei Pang <pang.xunlei@...aro.org>
Subject: [RFC PATCH 3/6] sched/rt: Check to push FIFO current away at each tick

From: Xunlei Pang <pang.xunlei@...aro.org>

There may be some non-migratable tasks queued in the "run queue"
with the same priority as current which is FIFO and migratable,
so at each tick we can check and try to push current away and
give these tasks a chance of running(we don't do this for tasks
queued with lower priority).

Signed-off-by: Xunlei Pang <pang.xunlei@...aro.org>
---
 kernel/sched/rt.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 7b76747..ddd5b19 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2314,10 +2314,17 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
 
 	/*
 	 * RR tasks need a special form of timeslice management.
-	 * FIFO tasks have no timeslices.
+	 * FIFO tasks have no timeslices. But if p(current) is a
+	 * FIFO task, try to push it away.
 	 */
-	if (p->policy != SCHED_RR)
+	if (p->policy != SCHED_RR) {
+		if (p->nr_cpus_allowed > 1 &&
+		    rq->rt.rt_nr_running > 1 &&
+		    !test_tsk_need_resched(p))
+			check_preempt_equal_prio_common(rq);
+
 		return;
+	}
 
 	if (--p->rt.time_slice)
 		return;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ