Commit 700bfc40 authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Yipeng Zou
Browse files

sched: smart grid: init sched_grid_qos structure on QOS purpose

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7BQZ0


CVE: NA

----------------------------------------

As smart grid scheduling (SGS) may shrink resources and affect task QOS,
We provide methods for evaluating task QOS in divided grid, we mainly
focus on the following two aspects:

   1. Evaluate whether (such as CPU or memory) resources meet our demand
   2. Ensure the least impact when working with (cpufreq and cpuidle)
      governors

For tackling this questions, we have summarized several sampling methods
to obtain tasks' characteristics at same time reducing scheduling noise
as much as possible:

  1. we detected the key factors that how sensitive a process is in cpufreq
     or cpuidle adjustment, and to guide the cpufreq/cpuidle governor
  2. We dynamically monitor process memory bandwidth and adjust memory
     allocation to minimize cross-remote memory access
  3. We provide a variety of load tracking mechanisms to adapt to different
     types of task's load change

     ---------------------------------     -----------------
    |            class A              |   |     class B     |
    |    --------        --------     |   |     --------    |
    |   | group0 |      | group1 |    |---|    | group2 |   |
    |    --------        --------     |   |     --------    |
    |    CPU/memory sensitive type    |   |   balance type  |
     ----------------+----------------     ------+-------+--
                     v                           v       | (target cpufreq)
     ----------------------------------------------      | (sensitivity)
    |              Not satisfied with QOS?         |     |
     --------------------------+-------------------      |
                               v                         v
     ----------------------------------------------     ----------------
    |              expand or shrink resource       |<--|  energy model  |
     ------------------------+---------------------     ----------------
                             v                           |
     -----------      -----------      ------------      v
    |           |    |           |    |            |    ---------------
    |   GRID0   +----+   GRID1   +----+   GRID2    |<--|   governor    |
    |           |    |           |    |            |    ---------------
     -----------      -----------      ------------
                   \            |            /
                    \  -------------------  /
                      |  pages migration  |
                       -------------------

We will introduce the energy model in the follow-up implementation, and
consider the dynamic affinity adjustment between each divided grid in the
runtime.

Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarYipeng Zou <zouyipeng@huawei.com>
parent 00d37128
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment