lkml.org 
[lkml]   [2015]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFCv5 PATCH 45/46] sched/cpufreq_sched: modify pcpu_capacity handling
    Date
    From: Juri Lelli <juri.lelli@arm.com>

    Use the cpu argument of cpufreq_sched_set_cap() to handle per_cpu writes,
    as the thing can be called remotely (e.g., from load balacing code).

    cc: Ingo Molnar <mingo@redhat.com>
    cc: Peter Zijlstra <peterz@infradead.org>

    Signed-off-by: Juri Lelli <juri.lelli@arm.com>
    ---
    kernel/sched/cpufreq_sched.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/sched/cpufreq_sched.c b/kernel/sched/cpufreq_sched.c
    index 06ff183..b81ac779 100644
    --- a/kernel/sched/cpufreq_sched.c
    +++ b/kernel/sched/cpufreq_sched.c
    @@ -151,7 +151,7 @@ void cpufreq_sched_set_cap(int cpu, unsigned long capacity)
    unsigned long capacity_max = 0;

    /* update per-cpu capacity request */
    - __this_cpu_write(pcpu_capacity, capacity);
    + per_cpu(pcpu_capacity, cpu) = capacity;

    policy = cpufreq_cpu_get(cpu);
    if (IS_ERR_OR_NULL(policy)) {
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-07-07 21:01    [W:4.155 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site