lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/51] x86, therm_throt.c: Fix CPU hotplug callback registration
On 02/10/2014 10:59 PM, Srivatsa S. Bhat wrote:
> On 02/10/2014 09:23 PM, Oleg Nesterov wrote:
>> On 02/06, Srivatsa S. Bhat wrote:
>>>
>>> --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
>>> +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
>>> @@ -319,7 +319,7 @@ static __init int thermal_throttle_init_device(void)
>>> if (!atomic_read(&therm_throt_en))
>>> return 0;
>>>
>>> - register_hotcpu_notifier(&thermal_throttle_cpu_notifier);
>>> + cpu_maps_update_begin();
>>>
>>> #ifdef CONFIG_HOTPLUG_CPU
>>> mutex_lock(&therm_cpu_lock);
>>> @@ -333,6 +333,9 @@ static __init int thermal_throttle_init_device(void)
>>> mutex_unlock(&therm_cpu_lock);
>>> #endif
>>>
>>> + __register_hotcpu_notifier(&thermal_throttle_cpu_notifier);
>>> + cpu_maps_update_done();
>>
>>
>> Off-topic, but it seems that after this change therm_cpu_lock can die.
>> Of course this needs another patch (if I am right).
>>
>
> I'm not sure I understood that clearly. Can you please explain?
>
> I'm guessing that you are referring to some problem with the #ifdef
> CONFIG_HOTPLUG_CPU around mutex_lock/unlock(&therm_cpu_lock) ?
>

Oh, nevermind, now I see it. Basically you are suggesting that therm_cpu_lock
is useless after this patch and hence can be removed entirely. Yep, that
makes sense. (I hadn't noticed it earlier). I'll incorporate that change
in a separate patch in my v2 of the patchset. Thank you!

Regards,
Srivatsa S. Bhat



\
 
 \ /
  Last update: 2014-02-10 20:01    [W:0.316 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site