[PATCH v4 2/4] sched/fair: Make CFS bandwidth controller burstable

2021-03-15 Thread Huaixin Chang
sysctl_sched_cfs_bw_burst_enabled is introduced as a switch for burst. It is enabled by default. Co-developed-by: Shanpei Chen Signed-off-by: Shanpei Chen Signed-off-by: Huaixin Chang --- include/linux/sched/sysctl.h | 1 + kernel/sched/core.c | 8 +++--- kernel/sched/fair.c | 58

[PATCH v4 3/4] sched/fair: Add cfs bandwidth burst statistics

2021-03-15 Thread Huaixin Chang
into cpu.stat file: nr_burst: number of periods bandwidth burst occurs burst_time: cumulative wall-time that any cpus has used above quota in respective periods Co-developed-by: Shanpei Chen Signed-off-by: Shanpei Chen Signed-off-by: Huaixin Chang --- kernel/sched/core.c | 14

[PATCH v4 4/4] sched/fair: Add document for burstable CFS bandwidth control

2021-03-15 Thread Huaixin Chang
Basic description of usage and effect for CFS Bandwidth Control Burst. Co-developed-by: Shanpei Chen Signed-off-by: Shanpei Chen Signed-off-by: Huaixin Chang --- Documentation/admin-guide/cgroup-v2.rst | 16 + Documentation/scheduler/sched-bwc.rst | 64

[PATCH v4 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-03-15 Thread Huaixin Chang
PU a group can consume in a given period is "buffer" which is equivalent to "quota" + "burst in case that this group has done enough accumulation. Co-developed-by: Shanpei Chen Signed-off-by: Shanpei Chen Signed-off-by: Huaixin Chang --- kernel/sched/core.c | 97

[PATCH v4 0/4] sched/fair: Burstable CFS bandwidth controller

2021-03-15 Thread Huaixin Chang
e present more latency statistics and handle overflow while accumulating. Huaixin Chang (4): sched/fair: Introduce primitives for CFS bandwidth burst sched/fair: Make CFS bandwidth controller burstable sched/fair: Add cfs bandwidth burst statistics sched/fair: Add document for burstable

[PATCH 4/4] sched/fair: Add document for burstable CFS bandwidth control

2021-02-02 Thread Huaixin Chang
Basic description of usage and effect for CFS Bandwidth Control Burst. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- Documentation/scheduler/sched-bwc.rst | 70 +-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/Documentation

[PATCH 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-02-02 Thread Huaixin Chang
PU a group can consume in a given period is "buffer" which is equivalent to "quota" + "burst in case that this group has done enough accumulation. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 91 +++

[PATCH 3/4] sched/fair: Add cfs bandwidth burst statistics

2021-02-02 Thread Huaixin Chang
in respective periods Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 6 ++ kernel/sched/fair.c | 12 +++- kernel/sched/sched.h | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH 2/4] sched/fair: Make CFS bandwidth controller burstable

2021-02-02 Thread Huaixin Chang
. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen Reported-by: kernel test robot --- include/linux/sched/sysctl.h | 2 ++ kernel/sched/core.c | 31 + kernel/sched/fair.c | 47 kernel/sched

[PATCH 0/4] sched/fair: Burstable CFS bandwidth controller

2021-02-02 Thread Huaixin Chang
ttps://lore.kernel.org/lkml/157476581065.5793.4518979877345136813.stgit@buzz/ This time we present more latency statistics and handle overflow while accumulating. Huaixin Chang (4): sched/fair: Introduce primitives for CFS bandwidth burst sched/fair: Make CFS bandwidth controller burstable

[PATCH v3 0/4] sched/fair: Burstable CFS bandwidth controller

2021-01-21 Thread Huaixin Chang
//lore.kernel.org/lkml/20180522062017.5193-1-xiyou.wangc...@gmail.com/ https://lore.kernel.org/lkml/157476581065.5793.4518979877345136813.stgit@buzz/ This time we present more latency statistics and handle overflow while accumulating. Huaixin Chang (4): sched/fair: Introduce primitives for CFS bandwi

[PATCH v3 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-01-21 Thread Huaixin Chang
PU a group can consume in a given period is "buffer" which is equivalent to "quota" + "burst in case that this group has done enough accumulation. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 91 +++

[PATCH v3 2/4] sched/fair: Make CFS bandwidth controller burstable

2021-01-21 Thread Huaixin Chang
. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen Reported-by: kernel test robot --- include/linux/sched/sysctl.h | 2 ++ kernel/sched/core.c | 31 + kernel/sched/fair.c | 47 kernel/sched

[PATCH v3 4/4] sched/fair: Add document for burstable CFS bandwidth control

2021-01-21 Thread Huaixin Chang
Basic description of usage and effect for CFS Bandwidth Control Burst. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- Documentation/scheduler/sched-bwc.rst | 70 +-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/Documentation

[PATCH v3 3/4] sched/fair: Add cfs bandwidth burst statistics

2021-01-21 Thread Huaixin Chang
in respective periods Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 6 ++ kernel/sched/fair.c | 12 +++- kernel/sched/sched.h | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2021-01-20 Thread Huaixin Chang
PU a group can consume in a given period is "buffer" which is equivalent to "quota" + "burst in case that this group has done enough accumulation. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 91 +++

[PATCH 3/4] sched/fair: Add cfs bandwidth burst statistics

2021-01-20 Thread Huaixin Chang
in respective periods Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 6 ++ kernel/sched/fair.c | 12 +++- kernel/sched/sched.h | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH 2/4] sched/fair: Make CFS bandwidth controller burstable

2021-01-20 Thread Huaixin Chang
. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen Reported-by: kernel test robot --- include/linux/sched/sysctl.h | 2 ++ kernel/sched/core.c | 31 + kernel/sched/fair.c | 46 kernel/sched

[PATCH 4/4] sched/fair: Add document for burstable CFS bandwidth control

2021-01-20 Thread Huaixin Chang
Basic description of usage and effect for CFS Bandwidth Control Burst. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- Documentation/scheduler/sched-bwc.rst | 70 +-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/Documentation

[PATCH v2 0/4] sched/fair: Burstable CFS bandwidth controller

2021-01-20 Thread Huaixin Chang
//lore.kernel.org/lkml/157476581065.5793.4518979877345136813.stgit@buzz/ This time we present more latency statistics and handle overflow while accumulating. Huaixin Chang (4): sched/fair: Introduce primitives for CFS bandwidth burst sched/fair: Make CFS bandwidth controller burstable sched/fair: Add cfs band

[PATCH 2/4] sched/fair: Make CFS bandwidth controller burstable

2020-12-16 Thread Huaixin Chang
. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- include/linux/sched/sysctl.h | 2 ++ kernel/sched/core.c | 31 + kernel/sched/fair.c | 46 kernel/sched/sched.h | 4 ++-- kernel

[PATCH 1/4] sched/fair: Introduce primitives for CFS bandwidth burst

2020-12-16 Thread Huaixin Chang
PU a group can consume in a given period is "buffer" which is equivalent to "quota" + "burst in case that this group has done enough accumulation. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 91 +++

[PATCH 4/4] sched/fair: Add document for burstable CFS bandwidth control

2020-12-16 Thread Huaixin Chang
Basic description of usage and effect for CFS Bandwidth Control Burst. Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- Documentation/scheduler/sched-bwc.rst | 49 --- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/Documentation

[PATCH 3/4] sched/fair: Add cfs bandwidth burst statistics

2020-12-16 Thread Huaixin Chang
in respective periods Signed-off-by: Huaixin Chang Signed-off-by: Shanpei Chen --- kernel/sched/core.c | 6 ++ kernel/sched/fair.c | 12 +++- kernel/sched/sched.h | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH 0/4] sched/fair: Burstable CFS bandwidth controller

2020-12-16 Thread Huaixin Chang
low while accumulating. Huaixin Chang (4): sched/fair: Introduce primitives for CFS bandwidth burst sched/fair: Make CFS bandwidth controller burstable sched/fair: Add cfs bandwidth burst statistics sched/fair: Add document for burstable CFS bandwidth control Documentation/schedul

[PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot

2020-08-06 Thread Huaixin Chang
The ORC fast lookup table is built by scripts/sorttable tool. All that is left is setting lookup_num_blocks. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86/kernel/unwind_orc.c | 41 ++--- 1 file changed, 2 insertions(+), 39 deletions

[PATCH 2/3] scripts/sorttable: Build ORC fast lookup table via sorttable tool

2020-08-06 Thread Huaixin Chang
Since ORC tables are already sorted by sorttable tool, let us move building of fast lookup table into sorttable tool too. This saves us 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with 64 cores. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86

[PATCH v2 0/3] Build ORC fast lookup table in scripts/sorttable tool

2020-08-06 Thread Huaixin Chang
two ORC lookup table macro from orc_lookup.h into orc_types.h 3. Spell 'ORC' in capitalized fashion Huaixin Chang (3): objtool: Write .orc_lookup section header scripts/sorttable: Build ORC fast lookup table via sorttable tool x86/unwind/orc: Simplify unwind_init() for x86 boot arch/x86

[PATCH 1/3] objtool: Write .orc_lookup section header

2020-08-06 Thread Huaixin Chang
1 [27] .vvar PROGBITS 8297e000 01b7e000 1000 WA 0 0 16 Signed-off-by: Huaixin Chang --- tools/objtool/orc_gen.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/objtool/orc_gen.c b/tools/objtool

[PATCH RESEND 0/3] Build ORC fast lookup table in scripts/sorttable tool

2020-07-22 Thread Huaixin Chang
lookup_num_blocks is still needed. Huaixin Chang (3): scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS scripts/sorttable: Build orc fast lookup table via sorttable tool x86/unwind/orc: Simplify unwind_init() for x86 boot arch/x86/kernel/unwind_orc.c | 41

[PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool

2020-07-22 Thread Huaixin Chang
Since orc tables are already sorted by sorttable tool, let us move building of fast lookup table into sorttable tool too. This saves us 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with 64 cores. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- scripts

[PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS

2020-07-22 Thread Huaixin Chang
-by: Huaixin Chang Signed-off-by: Shile Zhang --- include/asm-generic/vmlinux.lds.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..49f4f5bc6165 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include

[PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot

2020-07-22 Thread Huaixin Chang
The orc fast lookup table is built by scripts/sorttable tool. All that is left is setting lookup_num_blocks. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86/kernel/unwind_orc.c | 41 ++--- 1 file changed, 2 insertions(+), 39 deletions

[PATCH v3 0/3] Build ORC fast lookup table in scripts/sorttable tool

2020-06-03 Thread Huaixin Chang
. Type of section orc_lookup needs to be SHT_PROGBITS. 2. unwind_init() cannot be removed totally as setting lookup_num_blocks is needed. Huaixin Chang (3): scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS scripts/sorttable: Build orc fast lookup table via sorttable tool

[PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot

2020-06-03 Thread Huaixin Chang
The orc fast lookup table is built by scripts/sorttable tool. All that is left is setting lookup_num_blocks. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86/kernel/unwind_orc.c | 41 ++--- 1 file changed, 2 insertions(+), 39 deletions

[PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool

2020-06-03 Thread Huaixin Chang
Since orc tables are already sorted by sorttable tool, let us move building of fast lookup table into sorttable tool too. This saves us 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with 64 cores. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- scripts

[PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS

2020-06-03 Thread Huaixin Chang
-by: Huaixin Chang Signed-off-by: Shile Zhang --- include/asm-generic/vmlinux.lds.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..49f4f5bc6165 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include

[PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot

2020-06-03 Thread Huaixin Chang
The orc fast lookup table is built by scripts/sorttable tool. All that is left is setting lookup_num_blocks. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86/kernel/unwind_orc.c | 40 1 file changed, 40 deletions(-) diff --git

[PATCH v2 0/3] Build ORC fast lookup table in scripts/sorttable tool

2020-06-03 Thread Huaixin Chang
is needed. Huaixin Chang (3): scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS scripts/sorttable: Build orc fast lookup table via sorttable tool x86/unwind/orc: Simplify unwind_init() for x86 boot arch/x86/kernel/unwind_orc.c | 40 include/asm-generic

[PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS

2020-06-03 Thread Huaixin Chang
-by: Huaixin Chang Signed-off-by: Shile Zhang --- include/asm-generic/vmlinux.lds.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..49f4f5bc6165 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include

[PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool

2020-06-03 Thread Huaixin Chang
Since orc tables are already sorted by sorttable tool, let us move building of fast lookup table into sorttable tool too. This saves us 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with 64 cores. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- scripts

[tip: sched/core] sched: Defend cfs and rt bandwidth quota against overflow

2020-05-19 Thread tip-bot2 for Huaixin Chang
The following commit has been merged into the sched/core branch of tip: Commit-ID: d505b8af58912ae1e1a211fabc9995b19bd40828 Gitweb: https://git.kernel.org/tip/d505b8af58912ae1e1a211fabc9995b19bd40828 Author:Huaixin Chang AuthorDate:Sat, 25 Apr 2020 18:52:48 +08:00

[tip: sched/core] sched/fair: Refill bandwidth before scaling

2020-05-01 Thread tip-bot2 for Huaixin Chang
The following commit has been merged into the sched/core branch of tip: Commit-ID: 5a6d6a6ccb5f48ca8cf7c6d64ff83fd9c7999390 Gitweb: https://git.kernel.org/tip/5a6d6a6ccb5f48ca8cf7c6d64ff83fd9c7999390 Author:Huaixin Chang AuthorDate:Mon, 20 Apr 2020 10:44:21 +08:00

[PATCH 2/2] x86/unwind/orc: Remove unwind_init() from x86 boot

2020-04-29 Thread Huaixin Chang
All preparation has been moved to scripts/sorttable tool. No need to init unwind on boot now. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- arch/x86/include/asm/unwind.h | 2 -- arch/x86/kernel/setup.c | 2 -- arch/x86/kernel/unwind_orc.c | 51

[PATCH 0/2] Build ORC fast lookup table in scripts/sorttable tool

2020-04-29 Thread Huaixin Chang
Move building of fast lookup table from boot to sorttable tool. This saves us 6380us boot time on Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with cores. Huaixin Chang (2): scripts/sorttable: Build orc fast lookup table via sorttable tool x86/unwind/orc: Remove unwind_init() from x86 boot

[PATCH 1/2] scripts/sorttable: Build orc fast lookup table via sorttable tool

2020-04-29 Thread Huaixin Chang
Since orc tables are already sorted by sorttable tool, let us move building of fast lookup table into sorttable tool too. This saves us 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with 64 cores. Signed-off-by: Huaixin Chang Signed-off-by: Shile Zhang --- scripts