Re: [PATCH 2/3] RT: Cache cpus_allowed weight for optimizing migration

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gregory Haskins <ghaskins@...>
Cc: <linux-rt-users@...>, <linux-kernel@...>, Dmitry Adamushko <dmitry.adamushko@...>, Peter Zijlstra <a.p.zijlstra@...>, Ingo Molnar <mingo@...>, Darren Hart <dvhltc@...>
Date: Thursday, October 25, 2007 - 11:48 am

--
On Thu, 25 Oct 2007, Gregory Haskins wrote:


Not sure we need this optimization (not doing the nr_cpus_allowed
calculation). Since, due to priority boosting, we will need to calculate
then. Calculating it here is better.

new_mask); > +	else {

This code should be in the pick_next_highest_rt and not here.


I don't like this encapsulating of the doubl_lock_balance. There's a
reason I kept it out like this. Mainly because this is the source of most
(if not all) of the race condititions I fought. So this is a very
sensitive area to touch. In fact, I see a few races already introduced by
this patch. One is that you took out the "!task->se.or_rq" test. Which
means that a task could have ran and deactivated itself
(TASK_UNINTERRUPTIBLE) and you just added it to a run queue. (I hit that
race ;-)

So keep that code out in the open where it belongs. Its very sensitive.



Hmm, I must have missed where you update the mask at time of boosting.
Anyway, we shouldn't. The set_cpus_allowed should be done for all tasks.
Now you can have a handler to call for when a task changes class and
changes weight.

-- Steve

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

Messages in current thread:
[PATCH 0/3] RT: balance rt tasks enhancements v6, Gregory Haskins, (Thu Oct 25, 10:46 am)
[PATCH 3/3] RT: CPU priority management, Gregory Haskins, (Thu Oct 25, 10:46 am)
Re: [PATCH 3/3] RT: CPU priority management, Steven Rostedt, (Thu Oct 25, 11:27 am)
Re: [PATCH 3/3] RT: CPU priority management, Gregory Haskins, (Thu Oct 25, 1:26 pm)
Re: [PATCH 3/3] RT: CPU priority management, Steven Rostedt, (Thu Oct 25, 1:36 pm)
Re: [PATCH 3/3] RT: CPU priority management, Gregory Haskins, (Thu Oct 25, 1:55 pm)
Re: [PATCH 2/3] RT: Cache cpus_allowed weight for optimizing..., Steven Rostedt, (Thu Oct 25, 11:48 am)
[PATCH 1/3] RT: cleanup some push-rt logic, Gregory Haskins, (Thu Oct 25, 10:46 am)