lkml.org 
[lkml]   [2014]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched: spinlock recursion in migrate_swap_stop
On Thu, May 22, 2014 at 11:05:40AM +0530, Srikar Dronamraju wrote:
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 927fa33..b5e11c7 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -1154,6 +1156,7 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p)
> > goto out;
> >
> > trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu);
> > + BUG_ON(cur == p);
>
> I am not sure how this check can ever be successful because at the start
> of this function migrate_swap() we have
>
> if (arg.src_cpu == arg.dst_cpu)
> goto out;
>
>
> if cur is actually p; then should the above condition should always be
> successul right?
>
> Or am I missing something?

Yeah, current might have migrated while we were looking for a target.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-05-22 09:41    [W:0.038 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site