Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204915 > unrolled thread

Re: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler load-tracking support

Started byPeter Zijlstra <peterz@infradead.org>
First post2015-08-11 11:30 +0200
Last post2015-08-14 18:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler  load-tracking support Peter Zijlstra <peterz@infradead.org> - 2015-08-11 11:30 +0200
    Re: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler  load-tracking support Morten Rasmussen <morten.rasmussen@arm.com> - 2015-08-14 18:10 +0200

#1204915 — Re: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler load-tracking support

FromPeter Zijlstra <peterz@infradead.org>
Date2015-08-11 11:30 +0200
SubjectRe: [RFCv5 PATCH 01/46] arm: Frequency invariant scheduler load-tracking support
Message-ID<pWe2C-Wm-11@gated-at.bofh.it>
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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1207597

FromMorten Rasmussen <morten.rasmussen@arm.com>
Date2015-08-14 18:10 +0200
Message-ID<pXpIm-6Yn-19@gated-at.bofh.it>
In reply to#1204915
On Tue, Aug 11, 2015 at 11:27:54AM +0200, Peter Zijlstra wrote:
> 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.

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web