cpufreq: cpufreq_driver_lock is quite hot on 512p systems

From: Nathan Zimmer
Date: Wed Jan 30 2013 - 13:07:41 EST



I am noticing the cpufreq_driver_lock is quite hot.
Currently on an idle 512 system perf shows me most of the system time is
spent on this lock.

- 84.18% [kernel] [k] _raw_spin_lock_irqsave
- _raw_spin_lock_irqsave
- 99.97% __cpufreq_cpu_get
cpufreq_cpu_get
__cpufreq_driver_getavg
dbs_check_cpu
od_dbs_timer
process_one_work
worker_thread
kthread
ret_from_fork

The data this lock protects is used in a read mostly situation.
While exprimenting I found turning the lock to a rwlock fixed the problem.
It seems like this might be amenable to using the RCU.

Any other ideas on how to properly resolve the issue?

Thanks,
Nate

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/