Re: [PATCH 4/4] therm_throt: Add a cumulative thermal throttle event counter.

Andi Kleen
2006-09-22T05:51:11Z

> + preempt_disable(); /* CPU hotplug */
> + for_each_online_cpu(cpu) {
> + /* connect live CPUs to sysfs */
> + thermal_throttle_add_dev(get_cpu_sysdev(cpu));
> + }
> + preempt_enable();

There was still one problem in there: sysfs_create_group can
sleep and that's not ok with preemption disabled.

I changed it to register the notifier first and do the necessary
locking in there using a private lock (that the new akpm-recommended(tm)
way to do this)

-Andi