On Tue, Jul 07, 2015 at 07:23:44PM +0100, Morten Rasmussen wrote: > +static DEFINE_PER_CPU(atomic_long_t, cpu_max_freq); > +DEFINE_PER_CPU(atomic_long_t, cpu_freq_capacity);
> + atomic_long_set(&per_cpu(cpu_freq_capacity, cpu), capacity); > + unsigned long max = atomic_long_read(&per_cpu(cpu_max_freq, cpu)); > + atomic_long_set(&per_cpu(cpu_max_freq, i), policy->max); > + unsigned long curr = atomic_long_read(&per_cpu(cpu_freq_capacity, cpu)); The use of atomic_long_t here is entirely pointless. In fact (and someone needs to go fix this), its worse than WRITE_ONCE()/READ_ONCE(). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/