lkml.org 
[lkml]   [2011]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 08/17] sched: Drop the rq argument to sched_class::select_task_rq()
From
Date
On Tue, 2011-01-04 at 13:59 +0800, Yong Zhang wrote:
> On Mon, Jan 3, 2011 at 7:16 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > On Wed, 2010-12-29 at 22:31 +0800, Yong Zhang wrote:
> >> On Fri, Dec 24, 2010 at 01:23:46PM +0100, Peter Zijlstra wrote:
> >> > In preparation of calling select_task_rq() without rq->lock held, drop
> >> > the dependency on the rq argument.
> >> >
> >> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> > ---
> >> > @@ -3416,27 +3409,22 @@ void sched_exec(void)
> >> > {
> >> > struct task_struct *p = current;
> >> > unsigned long flags;
> >> > - struct rq *rq;
> >> > int dest_cpu;
> >> >
> >> > - rq = task_rq_lock(p, &flags);
> >> > - dest_cpu = p->sched_class->select_task_rq(rq, p, SD_BALANCE_EXEC, 0);
> >> > + raw_spin_lock_irqsave(&p->pi_lock, flags);
> >>
> >> Seems this should go to patch 07/17 ;)
> >
> > Ah, the reason its here is that this patch removes the rq argument and
> > thus we no longer need rq->lock. So this part relies on the property
> > introduced by patch 7.
>
> What I mean is we could firstly add pi_lock in patch 7 and then remove
> the rq argument in this patch. :)

No, that's the wrong way around.. anyway, I've pulled this into its own
patch and the next posting should hopefully be clearer.


\
 
 \ /
  Last update: 2011-01-04 14:03    [W:0.160 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site