lkml.org 
[lkml]   [2015]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler load-tracking support
    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().


    \
     
     \ /
      Last update: 2015-08-11 11:41    [W:2.229 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site