From: Oleg Nesterov <oleg@redhat.com>
To: David Hildenbrand <dahi@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, heiko.carstens@de.ibm.com,
borntraeger@de.ibm.com, rafael.j.wysocki@intel.com,
paulmck@linux.vnet.ibm.com, peterz@infradead.org, bp@suse.de,
jkosina@suse.cz
Subject: Re: [PATCH v5] CPU hotplug: active_writer not woken up in some cases - deadlock
Date: Sun, 14 Dec 2014 20:29:31 +0100 [thread overview]
Message-ID: <20141214192931.GB6372@redhat.com> (raw)
In-Reply-To: <1418375504-28715-1-git-send-email-dahi@linux.vnet.ibm.com>
On 12/12, David Hildenbrand wrote:
>
> void get_online_cpus(void)
> {
> @@ -103,8 +95,7 @@ void get_online_cpus(void)
> return;
> cpuhp_lock_acquire_read();
> mutex_lock(&cpu_hotplug.lock);
> - apply_puts_pending(65536);
> - cpu_hotplug.refcount++;
> + atomic_inc(&cpu_hotplug.refcount);
> mutex_unlock(&cpu_hotplug.lock);
I think the patch is fine.
I am wondering if it makes sense to add
if (atomic_inc_not_zero(&cpu_hotplug.refcount))
return;
before mutex_lock(). But even if I am right we can do this later.
Oleg.
prev parent reply other threads:[~2014-12-14 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 9:11 [PATCH v5] CPU hotplug: active_writer not woken up in some cases - deadlock David Hildenbrand
2014-12-12 17:22 ` Paul E. McKenney
2014-12-14 19:29 ` Oleg Nesterov [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=20141214192931.GB6372@redhat.com \
--to=oleg@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=bp@suse.de \
--cc=dahi@linux.vnet.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.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