You need to sign in or sign up before continuing.
  • Vincent Guittot's avatar
    sched/topology: Consolidate and clean up access to a CPU's max compute capacity · 7bc26384
    Vincent Guittot authored
    Remove the rq::cpu_capacity_orig field and use arch_scale_cpu_capacity()
    instead.
    
    The scheduler uses 3 methods to get access to a CPU's max compute capacity:
    
     - arch_scale_cpu_capacity(cpu) which is the default way to get a CPU's capacity.
    
     - cpu_capacity_orig field which is periodically updated with
       arch_scale_cpu_capacity().
    
     - capacity_orig_of(cpu) which encapsulates rq->cpu_capacity_orig.
    
    There is no real need to save the value returned by arch_scale_cpu_capacity()
    in struct rq. arch_scale_cpu_capacity() returns:
    
     - either a per_cpu variable.
    
     - or a const value for systems which have only one capacity.
    
    Remove rq::cpu_capacity_orig and use arch_scale_cpu_capacity() everywhere.
    
    No functional changes.
    
    Some performance tests on Arm64:
    
      - small SMP device (hikey): no noticeable changes
      - HMP device (RB5):         hackbench shows minor improvement (1-2%)
      - large smp (thx2):         hackbench and tbench shows ...
    7bc26384
cpudeadline.c 6.25 KB