• H
    sched: fix performance degradation on lmbench · c6aaa310
    Hui Tang 提交于
    hulk inclusion
    category: bugfix
    bugzilla: https://gitee.com/openeuler/kernel/issues/I7A718
    
    --------------------------------
    
    There are worse performance with the 'Fixes'
    when running "./lat_ctx -P $SYNC_MAX -s 64 16".
    
    The 'Fixes' which allocates memory for p->prefer_cpus
    even if "prefer_cpus" not be set.
    
    Before the 'Fixes', only test "p->prefer_cpus",
    after, add test "!cpumask_empty(p->prefer_cpus)"
    which causing performance degradation.
    
    select_task_rq_fair
      ->set_task_select_cpus
        ->prefer_cpus_valid  ----  test cpumask_empty(p->prefer_cpus)
    
    Fixes: ebeb84ad ("cpuset: Introduce new interface for scheduler ...")
    Signed-off-by: NHui Tang <tanghui20@huawei.com>
    (cherry picked from commit d8f77f89)
    c6aaa310
base.c 98.6 KB