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]
Date:	Thu, 14 Jul 2011 21:43:55 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [Question] sched: migrate RT task on throttled leaf RT runqueue?

Hi Steven

When a non-boosted RT task is enqueued, if it is attached to task group, as
shown in the following diff format for clarity, and even if the RT runqueue
owned by the task group is throttled, the rt_rq is loaded up as leaf and the
task is added to pushable list if it is pushable.

Since RT tasks on throttled rt_runqueue will not be picked to be the next task
when scheduling, could they be migrated by pushing and pulling?

Thanks,

Hillf
---
 kernel/sched_rt.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 97540f0..8489953 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -882,6 +882,9 @@ static void __enqueue_rt_entity(struct
sched_rt_entity *rt_se, bool head)
 	if (group_rq && (rt_rq_throttled(group_rq) || !group_rq->rt_nr_running))
 		return;

+	/* if (rt_rq_throttled(rt_rq) && !rt_se_boosted(rt_se))
+		return; */
+
 	if (!rt_rq->rt_nr_running)
 		list_add_leaf_rt_rq(rt_rq);

@@ -1418,6 +1421,9 @@ retry:
 		return 0;
 	}

+	if (rt_rq_throttled(rt_rq_of_se(&next_task->rt)))
+		return 0;
+
 	/* We might release rq lock */
 	get_task_struct(next_task);

@@ -1519,6 +1525,9 @@ static int pull_rt_task(struct rq *this_rq)

 		p = pick_next_highest_task_rt(src_rq, this_cpu);

+		if (p && rt_rq_throttled(rt_rq_of_se(&p->rt)))
+			goto skip;
+
 		/*
 		 * Do we have an RT task that preempts
 		 * the to-be-scheduled task?
--
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