lkml.org 
[lkml]   [2014]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] CPU hotplug: active_writer not woken up in some cases - deadlock
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.



\
 
 \ /
  Last update: 2014-12-14 20:41    [W:0.039 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site