Re: [RFC][PATCH 09/11] sched: first draft of deadline inheritance.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Wednesday, April 14, 2010 - 1:25 am

On Sun, 2010-02-28 at 20:26 +0100, Raistlin wrote:

Right, except that this makes the plist stuff O(INT_MAX) [ or rather
O(nr_dl_tasks) ].

But I guess it serves for testing.

I think it would be relatively straight forward to modify the existing
PI chain code to work using an RB-tree instead of the plist stuff.

An RB-tree would also make the whole ->prio mess much easier to solve,
we could simply make a more complex comparison function, like:

int rt_mutex_prio_less(struct task_struct *left, struct task_struct *right)
{
	if (left->prio < right->prio)
		return 1;

	if (left->prio == right->prio && left->prio == -1) {
		if (left->deadline < right->deadline)
			return 1;
	}

	return 0;
}

Which uses the static prio -1 to represent all deadline tasks.

Yeah, good enough to start with ;-)

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/11] sched: SCHED_DEADLINE v2, Raistlin, (Sun Feb 28, 12:06 pm)
Re: [RFC][PATCH 09/11] sched: first draft of deadline inhe ..., Peter Zijlstra, (Wed Apr 14, 1:25 am)
Re: [RFC][PATCH 0/11] sched: SCHED_DEADLINE v2, Peter Zijlstra, (Wed Apr 14, 3:17 am)