All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] sched/psi: some optimization and extension
@ 2022-07-21  4:04 Chengming Zhou
       [not found] ` <20220721040439.2651-1-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 57+ messages in thread
From: Chengming Zhou @ 2022-07-21  4:04 UTC (permalink / raw)
  To: hannes, surenb, mingo, peterz, tj, corbet, akpm, rdunlap
  Cc: linux-doc, linux-kernel, songmuchun, cgroups, Chengming Zhou

Hi all,

This patch series are some optimization and extension for PSI.

patch 1/9 fix periodic aggregation shut off problem introduced by earlier
commit 4117cebf1a9f ("psi: Optimize task switch inside shared cgroups").

patch 2/9 optimize task switch inside shared cgroups when in_memstall status
of prev task and next task are different.

patch 3-4 optimize and simplify PSI status tracking by don't change task
psi_flags when migrate CPU/cgroup.

patch 7-8 introduce new kernel cmdline parameter "psi_inner_cgroup=" to
configure whether or not to track PSI stall information for inner cgroups.

patch 9/9 introduce new PSI resource PSI_IRQ to track IRQ/SOFTIRQ pressure
stall information when CONFIG_IRQ_TIME_ACCOUNTING.

Performance test on Intel Xeon Platinum with 3 levels of cgroup, in which
run mmtests config-scheduler-perfpipe:

                                  tip                    tip                    tip                patched                patched                patched                patched
                               default   cgroup_disable=pressure  IRQ_TIME_ACCOUNTING              default      psi_inner_cgroup=off             PSI_IRQ    PSI_IRQ + psi_inner_cgroup=off
Min       Time        9.89 (   0.00%)        8.99 (   9.12%)       10.04 (  -1.53%)        9.63 (   2.58%)        9.27 (   6.22%)       10.09 (  -2.04%)        9.45 (   4.41%)
1st-qrtle Time       10.01 (   0.00%)        9.15 (   8.66%)       10.16 (  -1.45%)        9.72 (   2.89%)        9.35 (   6.61%)       10.20 (  -1.81%)        9.54 (   4.77%)
2nd-qrtle Time       10.07 (   0.00%)        9.25 (   8.12%)       10.19 (  -1.21%)        9.79 (   2.73%)        9.38 (   6.78%)       10.24 (  -1.75%)        9.59 (   4.68%)
3rd-qrtle Time       10.14 (   0.00%)        9.30 (   8.32%)       10.23 (  -0.88%)        9.84 (   3.00%)        9.44 (   6.92%)       10.27 (  -1.21%)        9.62 (   5.18%)
Max-1     Time        9.89 (   0.00%)        8.99 (   9.12%)       10.04 (  -1.53%)        9.63 (   2.58%)        9.27 (   6.22%)       10.09 (  -2.04%)        9.45 (   4.41%)
Max-5     Time        9.89 (   0.00%)        8.99 (   9.12%)       10.04 (  -1.53%)        9.63 (   2.58%)        9.27 (   6.22%)       10.09 (  -2.04%)        9.45 (   4.41%)
Max-10    Time        9.92 (   0.00%)        9.09 (   8.33%)       10.11 (  -1.97%)        9.67 (   2.51%)        9.29 (   6.29%)       10.15 (  -2.30%)        9.48 (   4.46%)
Max-90    Time       10.20 (   0.00%)        9.33 (   8.53%)       10.33 (  -1.24%)        9.87 (   3.29%)        9.49 (   6.99%)       10.29 (  -0.85%)        9.66 (   5.32%)
Max-95    Time       10.23 (   0.00%)        9.34 (   8.70%)       10.37 (  -1.39%)        9.94 (   2.83%)        9.53 (   6.88%)       10.30 (  -0.65%)        9.67 (   5.51%)
Max-99    Time       10.23 (   0.00%)        9.37 (   8.43%)       10.40 (  -1.63%)        9.99 (   2.41%)        9.76 (   4.57%)       10.31 (  -0.74%)        9.69 (   5.25%)
Max       Time       10.34 (   0.00%)        9.46 (   8.50%)       10.43 (  -0.83%)       17.04 ( -64.80%)        9.79 (   5.36%)       10.32 (   0.20%)        9.71 (   6.07%)
Amean     Time       10.08 (   0.00%)        9.23 *   8.39%*       10.21 *  -1.33%*       10.03 (   0.47%)        9.41 *   6.59%*       10.23 *  -1.53%*        9.59 *   4.87%*

Thanks!

Chengming Zhou (9):
  sched/psi: fix periodic aggregation shut off
  sched/psi: optimize task switch inside shared cgroups again
  sched/psi: move private helpers to sched/stats.h
  sched/psi: don't change task psi_flags when migrate CPU/group
  sched/psi: don't create cgroup PSI files when psi_disabled
  sched/psi: save percpu memory when !psi_cgroups_enabled
  sched/psi: cache parent psi_group to speed up groups iterate
  sched/psi: add kernel cmdline parameter psi_inner_cgroup
  sched/psi: add PSI_IRQ to track IRQ/SOFTIRQ pressure

 .../admin-guide/kernel-parameters.txt         |  11 +
 include/linux/psi.h                           |   5 +-
 include/linux/psi_types.h                     |   9 +-
 include/linux/sched.h                         |   3 -
 kernel/cgroup/cgroup.c                        |  30 +++
 kernel/sched/core.c                           |   2 +
 kernel/sched/psi.c                            | 194 +++++++++++++-----
 kernel/sched/stats.h                          |  71 ++++---
 8 files changed, 232 insertions(+), 93 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 57+ messages in thread
* Re: [PATCH 9/9] sched/psi: add PSI_IRQ to track IRQ/SOFTIRQ pressure
@ 2022-07-25  1:41 kernel test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kernel test robot @ 2022-07-25  1:41 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3210 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220721040439.2651-10-zhouchengming@bytedance.com>
References: <20220721040439.2651-10-zhouchengming@bytedance.com>
TO: Chengming Zhou <zhouchengming@bytedance.com>
TO: hannes(a)cmpxchg.org
TO: surenb(a)google.com
TO: mingo(a)redhat.com
TO: peterz(a)infradead.org
TO: tj(a)kernel.org
TO: corbet(a)lwn.net
TO: akpm(a)linux-foundation.org
TO: rdunlap(a)infradead.org
CC: linux-doc(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: songmuchun(a)bytedance.com
CC: cgroups(a)vger.kernel.org
CC: Chengming Zhou <zhouchengming@bytedance.com>

Hi Chengming,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on akpm-mm/mm-everything linus/master v5.19-rc8]
[cannot apply to tj-cgroup/for-next next-20220722]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chengming-Zhou/sched-psi-some-optimization-and-extension/20220721-120833
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 401e4963bf45c800e3e9ea0d3a0289d738005fd4
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220725/202207250938.YmyF2l5b-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
kernel/sched/psi.c:1475 psi_proc_init() warn: proc file '"pressure/irq"' is world writable

vim +1475 kernel/sched/psi.c

d14f2a9ff31fef Chengming Zhou     2022-07-21  1466  
eb414681d5a07d Johannes Weiner    2018-10-26  1467  static int __init psi_proc_init(void)
eb414681d5a07d Johannes Weiner    2018-10-26  1468  {
3d817689a62cf7 Wang Long          2019-12-18  1469  	if (psi_enable) {
eb414681d5a07d Johannes Weiner    2018-10-26  1470  		proc_mkdir("pressure", NULL);
6db12ee0456d0e Josh Hunt          2021-04-01  1471  		proc_create("pressure/io", 0666, NULL, &psi_io_proc_ops);
6db12ee0456d0e Josh Hunt          2021-04-01  1472  		proc_create("pressure/memory", 0666, NULL, &psi_memory_proc_ops);
6db12ee0456d0e Josh Hunt          2021-04-01  1473  		proc_create("pressure/cpu", 0666, NULL, &psi_cpu_proc_ops);
d14f2a9ff31fef Chengming Zhou     2022-07-21  1474  #ifdef CONFIG_IRQ_TIME_ACCOUNTING
d14f2a9ff31fef Chengming Zhou     2022-07-21 @1475  		proc_create("pressure/irq", 0666, NULL, &psi_irq_proc_ops);
d14f2a9ff31fef Chengming Zhou     2022-07-21  1476  #endif
3d817689a62cf7 Wang Long          2019-12-18  1477  	}
eb414681d5a07d Johannes Weiner    2018-10-26  1478  	return 0;
eb414681d5a07d Johannes Weiner    2018-10-26  1479  }
eb414681d5a07d Johannes Weiner    2018-10-26  1480  module_init(psi_proc_init);
5102bb1c9f8285 Suren Baghdasaryan 2022-01-19  1481  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2022-08-04 16:56 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21  4:04 [PATCH 0/9] sched/psi: some optimization and extension Chengming Zhou
     [not found] ` <20220721040439.2651-1-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-21  4:04   ` [PATCH 1/9] sched/psi: fix periodic aggregation shut off Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
2022-07-25 15:34     ` Johannes Weiner
     [not found]     ` <20220721040439.2651-2-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-25 15:39       ` Johannes Weiner
2022-07-25 15:39         ` Johannes Weiner
2022-07-26 13:28         ` Chengming Zhou
2022-07-21  4:04   ` [PATCH 2/9] sched/psi: optimize task switch inside shared cgroups again Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
2022-07-21  4:04   ` [PATCH 3/9] sched/psi: move private helpers to sched/stats.h Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
2022-07-25 16:39     ` Johannes Weiner
2022-07-21  4:04   ` [PATCH 4/9] sched/psi: don't change task psi_flags when migrate CPU/group Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
2022-07-21  4:04   ` [PATCH 7/9] sched/psi: cache parent psi_group to speed up groups iterate Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
2022-07-21  4:04   ` [PATCH 8/9] sched/psi: add kernel cmdline parameter psi_inner_cgroup Chengming Zhou
2022-07-21  4:04     ` Chengming Zhou
     [not found]     ` <20220721040439.2651-9-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-25 16:52       ` Johannes Weiner
2022-07-25 16:52         ` Johannes Weiner
     [not found]         ` <Yt7KQc0nnOypB2b2-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2022-07-26 13:38           ` [External] " Chengming Zhou
2022-07-26 13:38             ` Chengming Zhou
2022-07-26 17:54         ` Tejun Heo
     [not found]           ` <YuAqWprKd6NsWs7C-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-08-03 12:17             ` Chengming Zhou
2022-08-03 12:17               ` Chengming Zhou
2022-08-03 17:58               ` Tejun Heo
2022-08-03 19:22                 ` Johannes Weiner
2022-08-03 19:48                   ` Tejun Heo
2022-08-04 13:51                   ` Chengming Zhou
     [not found]                     ` <f8444db4-3235-d108-698a-6772e03a6b67-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-08-04 16:56                       ` Johannes Weiner
2022-08-04 16:56                         ` Johannes Weiner
2022-08-04  2:02                 ` Chengming Zhou
2022-07-21  4:04 ` [PATCH 5/9] sched/psi: don't create cgroup PSI files when psi_disabled Chengming Zhou
     [not found]   ` <20220721040439.2651-6-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-25 16:41     ` Johannes Weiner
2022-07-25 16:41       ` Johannes Weiner
2022-07-21  4:04 ` [PATCH 6/9] sched/psi: save percpu memory when !psi_cgroups_enabled Chengming Zhou
2022-07-25 16:47   ` Johannes Weiner
2022-07-21  4:04 ` [PATCH 9/9] sched/psi: add PSI_IRQ to track IRQ/SOFTIRQ pressure Chengming Zhou
     [not found]   ` <20220721040439.2651-10-zhouchengming-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-21 10:00     ` kernel test robot
2022-07-21 10:00       ` kernel test robot
2022-07-21 22:10     ` kernel test robot
2022-07-21 22:10       ` kernel test robot
2022-07-22  3:30     ` Abel Wu
2022-07-22  3:30       ` Abel Wu
     [not found]       ` <65d9f79b-be9b-e21e-0624-5c9f2cc0c0b2-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-22  6:13         ` Chengming Zhou
2022-07-22  6:13           ` Chengming Zhou
2022-07-22  7:14           ` Abel Wu
     [not found]             ` <5e5d41e2-5f89-8c52-11e5-0c55c5595a88-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-22  7:33               ` Chengming Zhou
2022-07-22  7:33                 ` Chengming Zhou
2022-07-27 16:07     ` Peter Zijlstra
2022-07-27 16:07       ` Peter Zijlstra
2022-07-25 18:26   ` Johannes Weiner
2022-07-26 13:55     ` [External] " Chengming Zhou
2022-07-27 11:28     ` Chengming Zhou
2022-07-27 13:00       ` Johannes Weiner
2022-07-27 15:09         ` Chengming Zhou
  -- strict thread matches above, loose matches on Subject: below --
2022-07-25  1:41 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.