• H
    alinux: sched/fair: use static load in wake_affine_weight · d2440c99
    Huaixin Chang 提交于
    For a long time runnable cpu load has been used in selecting task rq
    when waking up tasks. Recent test has shown for test load with a large
    quantity of short running tasks and almost full cpu utility, static load
    is more helpful.
    
    In our e2e tests, runnable load avg of java threads ranges from less than
    10 to as large as 362, while these java threads are no different from
    each other, and should be treated in the same way. After using static
    load, qps imporvement has been seen in multiple test cases.
    
    A new sched feature WA_STATIC_WEIGHT is introduced here to control. Echo
    WA_STATIC_WEIGHT to /sys/kernel/debug/sched_features to turn static load
    in wake_affine_weight on and NO_WA_STATIC_WEIGHT to turn it off. This
    feature is kept off by default.
    
    Test is done on the following hardware:
    
    4 threads Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
    
    In tests with 120 threads and sql loglevel configured to info:
    
    	NO_WA_STATIC_WEIGHT     WA_STATIC_WEIGHT
    	33170.63                34614.95 (+4.35%)
    
    In tests with 160 threads and sql loglevel configured to info:
    
    	NO_WA_STATIC_WEIGHT     WA_STATIC_WEIGHT
    	35888.71                38247.20 (+6.57%)
    
    In tests with 160 threads and sql loglevel configured to warn:
    
    	NO_WA_STATIC_WEIGHT     WA_STATIC_WEIGHT
    	39118.72                39698.72 (+1.48%)
    Signed-off-by: NHuaixin Chang <changhuaixin@linux.alibaba.com>
    Acked-by: NShanpei Chen <shanpeic@linux.alibaba.com>
    d2440c99
fair.c 271.6 KB