Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nathan Lynch <ntl@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, Srivatsa Vaddagiri <vatsa@...>, Rusty Russel <rusty@...>, Dipankar Sarma <dipankar@...>, Oleg Nesterov <oleg@...>, Ingo Molnar <mingo@...>, Paul E McKenney <paulmck@...>
Date: Friday, October 19, 2007 - 1:04 am

Hi Nathan, 


Okay. But other than pseries_add_processor and pseries_remove_processor,
are there any other places where we _change_ the cpu_present_map ?

I agree that we need some kind of synchronization for threads which read
the cpu_present_map. But probably we can use a seperate mutex for that.




One of the primary reasons to move away from the mutex semantics for
cpu-hotplug protection, was that there were a lot of places where
lock_cpu_hotplug() was used for protecting local data structures too,
when they had nothing to do with cpu-hotplug as such, and it resulted 
in a whole mess. It took people quite sometime to sort things out 
with the cpufreq subsystem.

Probably it would be a lot cleaner if we use get_online_cpus() for
protection against cpu-hotplug and use specific mutexes for serializing
accesses to local data structures. Thoughts?

Thanks and Regards
gautham.

-- 
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit., Gautham R Shenoy, (Tue Oct 16, 6:33 am)
Re: [RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit., Linus Torvalds, (Tue Oct 16, 1:20 pm)
Re: [RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit., Dipankar Sarma, (Tue Oct 16, 10:11 pm)
Re: [RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit., Linus Torvalds, (Tue Oct 16, 10:23 pm)
Re: [RFC PATCH 0/4] Refcount Based Cpu-Hotplug Revisit., Gautham R Shenoy, (Wed Oct 17, 12:17 am)
Re: [RFC PATCH 3/4] Replace per-subsystem mutexes with get_o..., Gautham R Shenoy, (Mon Oct 22, 12:58 am)
[RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus, Gautham R Shenoy, (Tue Oct 16, 6:35 am)
Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus, Gautham R Shenoy, (Fri Oct 19, 1:04 am)
Re: [RFC PATCH 2/4] Rename lock_cpu_hotplug to get_online_cpus, Gautham R Shenoy, (Mon Oct 22, 12:51 am)
[RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation, Gautham R Shenoy, (Tue Oct 16, 6:34 am)
Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation, Gautham R Shenoy, (Wed Oct 17, 7:50 am)
Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation, Gautham R Shenoy, (Wed Oct 17, 1:37 am)
Re: [RFC PATCH 1/4] Refcount Based Cpu-Hotplug Implementation, Gautham R Shenoy, (Thu Oct 18, 2:29 am)