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


Groups > linux.kernel > #1306748

Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their locks

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their locks
Date 2016-01-11 23:10 +0100
Message-ID <qPSP0-7w-13@gated-at.bofh.it> (permalink)
References <qPOBH-5zs-9@gated-at.bofh.it> <qPOLn-5E8-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jan 11, 2016 at 05:35:45PM +0000, Juri Lelli wrote:
> +/**
> + * The "cpufreq driver" - the arch- or hardware-dependent low
> + * level driver of CPUFreq support, and its spinlock (cpufreq_driver_lock).
> + * This lock also protects cpufreq_cpu_data array and cpufreq_policy_list.
> + */
> +static struct cpufreq_driver *cpufreq_driver;
> +static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data);
>  static LIST_HEAD(cpufreq_policy_list);
> +static DEFINE_RWLOCK(cpufreq_driver_lock);

Part of my suggestion was to fold the per-cpu data of cpufreq_cpu_data
into struct cpufreq_driver.

That way each cpufreq_driver will have its own copy and there'd be only
the one global pointer to swizzle. Something very well suited to RCU.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 04/19] cpufreq: bring data structures close to their locks Juri Lelli <juri.lelli@arm.com> - 2016-01-11 18:50 +0100
  Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Peter Zijlstra <peterz@infradead.org> - 2016-01-11 23:10 +0100
    Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their locks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-12 00:10 +0100
      Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Peter Zijlstra <peterz@infradead.org> - 2016-01-12 09:30 +0100
        Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Juri Lelli <juri.lelli@arm.com> - 2016-01-12 11:50 +0100
        Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their locks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-12 17:50 +0100
  Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Peter Zijlstra <peterz@infradead.org> - 2016-01-11 23:10 +0100
    Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-12 10:40 +0100
      Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Juri Lelli <juri.lelli@arm.com> - 2016-01-12 12:30 +0100
        Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Peter Zijlstra <peterz@infradead.org> - 2016-01-12 13:00 +0100
          Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Juri Lelli <juri.lelli@arm.com> - 2016-01-12 13:40 +0100
            Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Juri Lelli <juri.lelli@arm.com> - 2016-01-12 16:30 +0100
              Re: [RFC PATCH 04/19] cpufreq: bring data structures close to their  locks Peter Zijlstra <peterz@infradead.org> - 2016-01-12 17:00 +0100

csiph-web