mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>,
	Ingo Molnar <mingo@kernel.org>, Mel Gorman <mgorman@suse.de>,
	Rik van Riel <riel@redhat.com>, Dave Jones <davej@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: sched: spinlock recursion in migrate_swap_stop
Date: Thu, 22 May 2014 09:00:29 +0200	[thread overview]
Message-ID: <20140522070029.GK30445@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140522053540.GA26857@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

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.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2014-05-22  7:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 18:25 Sasha Levin
2014-05-20  2:05 ` Sasha Levin
2014-05-20 11:04   ` Peter Zijlstra
2014-05-20 13:03     ` Sasha Levin
2014-05-21 13:08       ` Sasha Levin
2014-05-21 13:19         ` Peter Zijlstra
2014-05-21 16:49           ` Peter Zijlstra
2014-05-22  2:34             ` Sasha Levin
2014-05-22  6:59               ` Peter Zijlstra
2014-05-23  4:03                 ` Sasha Levin
2014-05-22  5:35         ` Srikar Dronamraju
2014-05-22  7:00           ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140522070029.GK30445@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=srikar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome