public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Stepan Moskovchenko <stepanm@codeaurora.org>
Cc: Dima Zavin <dima@android.com>, Kukjin Kim <kgene.kim@samsung.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Frank Rowand <frank.rowand@am.sony.com>,
	amit kachhap <amit.kachhap@linaro.org>,
	Colin Cross <ccross@android.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	chaos.youn@samsung.com,
	LAK <linux-arm-kernel@lists.infradead.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Re: [patch] ARM: smpboot: Enable interrupts after marking CPU online/active
Date: Tue, 15 Nov 2011 23:00:59 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.02.1111152259430.4902@ionos> (raw)
In-Reply-To: <4EC2DF93.2050904@codeaurora.org>

On Tue, 15 Nov 2011, Stepan Moskovchenko wrote:
> I am seeing a deadlock when executing hotplug operations with this patch
> applied. When the secondary CPU gets brought up in _cpu_up, the cpu is turned
> on
> and then the online notifier gets called, which is what marks the secondary
> CPU
> as active. If _cpu_up on the primary CPU is preempted before the secondary CPU
> is marked active, it is possible that the primary CPU will want to call
> smp_call_function (or send an IPI) to the secondary CPU because it is marked
> online. However, with this patch, the secondary CPU is still spinning on
> !cpu_active(cpu)
> with interrupts disabled. So, the primary CPU is now stuck in csd_lock_wait(),
> waiting for the secondary CPU to respond, while the secondary CPU spins with
> interrupts disabled, waiting for the primary CPU to mark it as active. So,
> while
> your approach to not call smp_function_single may work for you in your
> specific
> case, I believe there is still a problem in the general case.
> 
> One suggestion for resolving this might be making smp_call_function look at
> the
> active CPUs rather than online CPUs, or to just let the secondary CPU mark
> itself as active rather than having the primary CPU do this, though this might
> defeat the original intended purpose of the active mask.

What a mess. I'll have a look tomorrow.

       reply	other threads:[~2011-11-15 22:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110908215314.829452535@linutronix.de>
     [not found] ` <CADGdYn6V_eQJZ4=irMbSS7XJj4MJVeALxcrWdD7o2bGs1sEJZQ@mail.gmail.com>
     [not found]   ` <20110913133258.GA6267@n2100.arm.linux.org.uk>
     [not found]     ` <CAKfTPtCWuiOM5+sOwdh1FzXZb1EFT__tVEpRPY5suGOxpYTdQQ@mail.gmail.com>
     [not found]       ` <20110913175312.GB6267@n2100.arm.linux.org.uk>
     [not found]         ` <20110923084001.GP17169@n2100.arm.linux.org.uk>
     [not found]           ` <01d501cc84d6$62720890$275619b0$%kim@samsung.com>
     [not found]             ` <alpine.LFD.2.02.1110071354310.3240@ionos>
     [not found]               ` <CAPz4a6CkOXp6LHX2hFYVBhXWT4rhCUzLyYTLbO7g8u_jYcHt7Q@mail.gmail.com>
     [not found]                 ` <CAPz4a6C7md+k8pCz6mJtB-v_1h-faGxQZkOqU9vHUtcG-jrYVQ@mail.gmail.com>
     [not found]                   ` <4EC2DF93.2050904@codeaurora.org>
2011-11-15 22:00                     ` Thomas Gleixner [this message]
2011-12-14  0:13                       ` Re: [patch] ARM: smpboot: Enable interrupts after marking CPU online/active Dima Zavin
2011-12-14  0:26                         ` Thomas Gleixner
2011-12-15 16:09                           ` Peter Zijlstra
2012-03-13  4:45                             ` [tip:sched/core] sched: Cleanup cpu_active madness tip-bot for Peter Zijlstra

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=alpine.LFD.2.02.1111152259430.4902@ionos \
    --to=tglx@linutronix.de \
    --cc=amit.kachhap@linaro.org \
    --cc=ccross@android.com \
    --cc=chaos.youn@samsung.com \
    --cc=dima@android.com \
    --cc=frank.rowand@am.sony.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=peterz@infradead.org \
    --cc=stepanm@codeaurora.org \
    --cc=vincent.guittot@linaro.org \
    /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