All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
@ 2022-05-22  6:35 kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-05-22  6:35 UTC (permalink / raw)
  To: kbuild

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

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220520235138.3140590-1-joshdon@google.com>
References: <20220520235138.3140590-1-joshdon@google.com>
TO: Josh Don <joshdon@google.com>
TO: Ingo Molnar <mingo@redhat.com>
TO: Peter Zijlstra <peterz@infradead.org>
TO: Juri Lelli <juri.lelli@redhat.com>
TO: Vincent Guittot <vincent.guittot@linaro.org>
TO: Tejun Heo <tj@kernel.org>
CC: Dietmar Eggemann <dietmar.eggemann@arm.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ben Segall <bsegall@google.com>
CC: Mel Gorman <mgorman@suse.de>
CC: Daniel Bristot de Oliveira <bristot@redhat.com>
CC: Valentin Schneider <vschneid@redhat.com>
CC: linux-kernel(a)vger.kernel.org
CC: Cruz Zhao <CruzZhao@linux.alibaba.com>
CC: Josh Don <joshdon@google.com>

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on tip/sched/core tip/master v5.18-rc7 next-20220520]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
:::::: branch date: 31 hours ago
:::::: commit date: 31 hours ago
config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220522/202205221414.PmwthuWY-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b369762beb70dfef22c7e793aed79b94d7dc0757)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/0575a42c9f10cda618b09b949cc42fe97abea479
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
        git checkout 0575a42c9f10cda618b09b949cc42fe97abea479
        # save the config file
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer 

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


clang-analyzer warnings: (new ones prefixed by >>)
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1394:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                   memcpy(Add2Ptr(attr, SIZEOF_RESIDENT), I30_NAME,
                   ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1398:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memcpy(root, dir_root, offsetof(struct INDEX_ROOT, ihdr));
                   ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1398:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                   memcpy(root, dir_root, offsetof(struct INDEX_ROOT, ihdr));
                   ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1526:4: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                           memcpy(Add2Ptr(attr, SIZEOF_RESIDENT), rp, nsize);
                           ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1526:4: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                           memcpy(Add2Ptr(attr, SIZEOF_RESIDENT), rp, nsize);
                           ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1862:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memcpy(buffer, "OneDrive", err);
                   ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   fs/ntfs3/inode.c:1862:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                   memcpy(buffer, "OneDrive", err);
                   ^
   include/linux/fortify-string.h:369:26: note: expanded from macro 'memcpy'
   #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:362:2: note: expanded from macro '__fortify_memcpy_chk'
           __underlying_##op(p, q, __fortify_size);                        \
           ^~~~~~~~~~~~~~~~~
   note: expanded from here
   include/linux/fortify-string.h:45:29: note: expanded from macro '__underlying_memcpy'
   #define __underlying_memcpy     __builtin_memcpy
                                   ^~~~~~~~~~~~~~~~
   Suppressed 47 warnings (47 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   38 warnings generated.
>> kernel/cgroup/rstat.c:455:24: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
                   bstat->forceidle_sum += cpustat[CPUTIME_FORCEIDLE];
                                        ^
   kernel/cgroup/rstat.c:467:2: note: Taking false branch
           if (cgroup_parent(cgrp)) {
           ^
   kernel/cgroup/rstat.c:477:3: note: Calling 'root_cgroup_cputime'
                   root_cgroup_cputime(&bstat);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:433:2: note: Assuming 'i' is < 'nr_cpu_ids'
           for_each_possible_cpu(i) {
           ^
   include/linux/cpumask.h:814:36: note: expanded from macro 'for_each_possible_cpu'
   #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:278:3: note: expanded from macro 'for_each_cpu'
                   (cpu) < nr_cpu_ids;)
                   ^~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:433:2: note: Loop condition is true.  Entering loop body
           for_each_possible_cpu(i) {
           ^
   include/linux/cpumask.h:814:36: note: expanded from macro 'for_each_possible_cpu'
   #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask)
                                      ^
   include/linux/cpumask.h:276:2: note: expanded from macro 'for_each_cpu'
           for ((cpu) = -1;                                \
           ^
   kernel/cgroup/rstat.c:455:24: note: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
                   bstat->forceidle_sum += cpustat[CPUTIME_FORCEIDLE];
                   ~~~~~~~~~~~~~~~~~~~~ ^
>> kernel/cgroup/rstat.c:482:18: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
                   forceidle_time = bstat.forceidle_sum;
                                  ^ ~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:467:2: note: Taking false branch
           if (cgroup_parent(cgrp)) {
           ^
   kernel/cgroup/rstat.c:477:3: note: Calling 'root_cgroup_cputime'
                   root_cgroup_cputime(&bstat);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:433:2: note: Assuming 'i' is >= 'nr_cpu_ids'
           for_each_possible_cpu(i) {
           ^
   include/linux/cpumask.h:814:36: note: expanded from macro 'for_each_possible_cpu'
   #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:278:3: note: expanded from macro 'for_each_cpu'
                   (cpu) < nr_cpu_ids;)
                   ^~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:433:2: note: Loop condition is false. Execution continues on line 433
           for_each_possible_cpu(i) {
           ^
   include/linux/cpumask.h:814:36: note: expanded from macro 'for_each_possible_cpu'
   #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask)
                                      ^
   include/linux/cpumask.h:276:2: note: expanded from macro 'for_each_cpu'
           for ((cpu) = -1;                                \
           ^
   kernel/cgroup/rstat.c:458:1: note: Returning without writing to 'bstat->forceidle_sum'
   }
   ^
   kernel/cgroup/rstat.c:477:3: note: Returning from 'root_cgroup_cputime'
                   root_cgroup_cputime(&bstat);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/cgroup/rstat.c:482:18: note: Assigned value is garbage or undefined
                   forceidle_time = bstat.forceidle_sum;
                                  ^ ~~~~~~~~~~~~~~~~~~~
   Suppressed 36 warnings (36 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   25 warnings generated.
   Suppressed 25 warnings (25 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   25 warnings generated.
   Suppressed 25 warnings (25 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   25 warnings generated.
   Suppressed 25 warnings (25 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   26 warnings generated.
   Suppressed 26 warnings (26 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   47 warnings generated.
   drivers/iio/adc/ad7606.c:660:9: warning: Called function pointer is null (null dereference) [clang-analyzer-core.CallAndMessage]
                   ret = st->bops->sw_mode_config(indio_dev);
                         ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/adc/ad7606.c:575:6: note: Assuming 'indio_dev' is non-null
           if (!indio_dev)
               ^~~~~~~~~~
   drivers/iio/adc/ad7606.c:575:2: note: Taking false branch
           if (!indio_dev)
           ^
   drivers/iio/adc/ad7606.c:582:2: note: Loop condition is false.  Exiting loop
           mutex_init(&st->lock);
           ^
   include/linux/mutex.h:101:32: note: expanded from macro 'mutex_init'
   #define mutex_init(mutex)                                               \
                                                                           ^
   drivers/iio/adc/ad7606.c:592:2: note: Taking false branch
           if (IS_ERR(st->reg))
           ^
   drivers/iio/adc/ad7606.c:596:6: note: Assuming 'ret' is 0
           if (ret) {
               ^~~
   drivers/iio/adc/ad7606.c:596:2: note: Taking false branch
           if (ret) {
           ^
   drivers/iio/adc/ad7606.c:601:8: note: Calling 'devm_add_action_or_reset'
           ret = devm_add_action_or_reset(dev, ad7606_regulator_disable, st);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/device.h:255:6: note: Assuming 'ret' is 0, which participates in a condition later
           if (ret)
               ^~~
   include/linux/device.h:255:2: note: Taking false branch
           if (ret)
           ^
   include/linux/device.h:258:2: note: Returning zero (loaded from 'ret'), which participates in a condition later
           return ret;
           ^~~~~~~~~~
   drivers/iio/adc/ad7606.c:601:8: note: Returning from 'devm_add_action_or_reset'
           ret = devm_add_action_or_reset(dev, ad7606_regulator_disable, st);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/adc/ad7606.c:602:6: note: 'ret' is 0
           if (ret)
               ^~~
   drivers/iio/adc/ad7606.c:602:2: note: Taking false branch
           if (ret)
           ^
   drivers/iio/adc/ad7606.c:607:6: note: Assuming field 'oversampling_num' is 0
           if (st->chip_info->oversampling_num) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/adc/ad7606.c:607:2: note: Taking false branch
           if (st->chip_info->oversampling_num) {

vim +455 kernel/cgroup/rstat.c

041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  418  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  419  /*
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  420   * compute the cputime for the root cgroup by getting the per cpu data
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  421   * at a global level, then categorizing the fields in a manner consistent
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  422   * with how it is done by __cgroup_account_cputime_field for each bit of
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  423   * cpu time attributed to a cgroup.
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  424   */
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  425  static void root_cgroup_cputime(struct cgroup_base_stat *bstat)
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  426  {
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  427  	struct task_cputime *cputime = &bstat->cputime;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  428  	int i;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  429  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  430  	cputime->stime = 0;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  431  	cputime->utime = 0;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  432  	cputime->sum_exec_runtime = 0;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  433  	for_each_possible_cpu(i) {
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  434  		struct kernel_cpustat kcpustat;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  435  		u64 *cpustat = kcpustat.cpustat;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  436  		u64 user = 0;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  437  		u64 sys = 0;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  438  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  439  		kcpustat_cpu_fetch(&kcpustat, i);
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  440  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  441  		user += cpustat[CPUTIME_USER];
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  442  		user += cpustat[CPUTIME_NICE];
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  443  		cputime->utime += user;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  444  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  445  		sys += cpustat[CPUTIME_SYSTEM];
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  446  		sys += cpustat[CPUTIME_IRQ];
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  447  		sys += cpustat[CPUTIME_SOFTIRQ];
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  448  		cputime->stime += sys;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  449  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  450  		cputime->sum_exec_runtime += user;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  451  		cputime->sum_exec_runtime += sys;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  452  		cputime->sum_exec_runtime += cpustat[CPUTIME_STEAL];
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  453  
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  454  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @455  		bstat->forceidle_sum += cpustat[CPUTIME_FORCEIDLE];
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  456  #endif
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  457  	}
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  458  }
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  459  
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462  	struct cgroup *cgrp = seq_css(seq)->cgroup;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463  	u64 usage, utime, stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464  	struct cgroup_base_stat bstat;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465  	u64 __maybe_unused forceidle_time;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467  	if (cgroup_parent(cgrp)) {
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468  		cgroup_rstat_flush_hold(cgrp);
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469  		usage = cgrp->bstat.cputime.sum_exec_runtime;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470  		cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471  			       &utime, &stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473  		forceidle_time = cgrp->bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475  		cgroup_rstat_flush_release();
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476  	} else {
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477  		root_cgroup_cputime(&bstat);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478  		usage = bstat.cputime.sum_exec_runtime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479  		utime = bstat.cputime.utime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480  		stime = bstat.cputime.stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @482  		forceidle_time = bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484  	}
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485  
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486  	do_div(usage, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487  	do_div(utime, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488  	do_div(stime, NSEC_PER_USEC);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  489  	do_div(forceidle_time, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490  
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491  	seq_printf(seq, "usage_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492  		   "user_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493  		   "system_usec %llu\n",
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494  		   usage, utime, stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495  

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

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-23 11:27   ` Dan Carpenter
@ 2022-05-23 21:20     ` Josh Don
  -1 siblings, 0 replies; 12+ messages in thread
From: Josh Don @ 2022-05-23 21:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: kbuild, Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Tejun Heo, 0day robot, kbuild-all, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
	Cruz Zhao

On Mon, May 23, 2022 at 4:28 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Hi Josh,
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
> config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205211525.XlF6P8dM-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-1) 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/cgroup/rstat.c:489 cgroup_base_stat_cputime_show() error: uninitialized symbol 'forceidle_time'.
>
> vim +/forceidle_time +489 kernel/cgroup/rstat.c
>
> d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462       struct cgroup *cgrp = seq_css(seq)->cgroup;
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463       u64 usage, utime, stime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464       struct cgroup_base_stat bstat;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465       u64 __maybe_unused forceidle_time;
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467       if (cgroup_parent(cgrp)) {
> 6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468               cgroup_rstat_flush_hold(cgrp);
> d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469               usage = cgrp->bstat.cputime.sum_exec_runtime;
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470               cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471                              &utime, &stime);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473               forceidle_time = cgrp->bstat.forceidle_sum;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
> 6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475               cgroup_rstat_flush_release();
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476       } else {
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477               root_cgroup_cputime(&bstat);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478               usage = bstat.cputime.sum_exec_runtime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479               utime = bstat.cputime.utime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480               stime = bstat.cputime.stime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  482               forceidle_time = bstat.forceidle_sum;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484       }
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486       do_div(usage, NSEC_PER_USEC);
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487       do_div(utime, NSEC_PER_USEC);
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488       do_div(stime, NSEC_PER_USEC);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @489       do_div(forceidle_time, NSEC_PER_USEC);
>
> I think this will cause MEMSan warnings at run time.

Whoops, I missed wrapping this usage with an #ifdef CONFIG_SCHED_CORE.

> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491       seq_printf(seq, "usage_usec %llu\n"
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492                  "user_usec %llu\n"
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493                  "system_usec %llu\n",
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494                  usage, utime, stime);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
>

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
@ 2022-05-23 21:20     ` Josh Don
  0 siblings, 0 replies; 12+ messages in thread
From: Josh Don @ 2022-05-23 21:20 UTC (permalink / raw)
  To: kbuild-all

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

On Mon, May 23, 2022 at 4:28 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Hi Josh,
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
> config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205211525.XlF6P8dM-lkp(a)intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-1) 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/cgroup/rstat.c:489 cgroup_base_stat_cputime_show() error: uninitialized symbol 'forceidle_time'.
>
> vim +/forceidle_time +489 kernel/cgroup/rstat.c
>
> d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462       struct cgroup *cgrp = seq_css(seq)->cgroup;
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463       u64 usage, utime, stime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464       struct cgroup_base_stat bstat;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465       u64 __maybe_unused forceidle_time;
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467       if (cgroup_parent(cgrp)) {
> 6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468               cgroup_rstat_flush_hold(cgrp);
> d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469               usage = cgrp->bstat.cputime.sum_exec_runtime;
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470               cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471                              &utime, &stime);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473               forceidle_time = cgrp->bstat.forceidle_sum;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
> 6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475               cgroup_rstat_flush_release();
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476       } else {
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477               root_cgroup_cputime(&bstat);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478               usage = bstat.cputime.sum_exec_runtime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479               utime = bstat.cputime.utime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480               stime = bstat.cputime.stime;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  482               forceidle_time = bstat.forceidle_sum;
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
> 936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484       }
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486       do_div(usage, NSEC_PER_USEC);
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487       do_div(utime, NSEC_PER_USEC);
> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488       do_div(stime, NSEC_PER_USEC);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @489       do_div(forceidle_time, NSEC_PER_USEC);
>
> I think this will cause MEMSan warnings at run time.

Whoops, I missed wrapping this usage with an #ifdef CONFIG_SCHED_CORE.

> 041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491       seq_printf(seq, "usage_usec %llu\n"
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492                  "user_usec %llu\n"
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493                  "system_usec %llu\n",
> d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494                  usage, utime, stime);
> 0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
>

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-21 10:00 ` Peter Zijlstra
@ 2022-05-23 21:19   ` Josh Don
  0 siblings, 0 replies; 12+ messages in thread
From: Josh Don @ 2022-05-23 21:19 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Juri Lelli, Vincent Guittot, Tejun Heo,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
	Cruz Zhao

On Sat, May 21, 2022 at 3:00 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Fri, May 20, 2022 at 04:51:38PM -0700, Josh Don wrote:
>
> > diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
> > index 38a2cec21014..ddef2b8ddf68 100644
> > --- a/kernel/sched/core_sched.c
> > +++ b/kernel/sched/core_sched.c
> > @@ -277,7 +277,11 @@ void __sched_core_account_forceidle(struct rq *rq)
> >               if (p == rq_i->idle)
> >                       continue;
> >
> > -             __schedstat_add(p->stats.core_forceidle_sum, delta);
> > +             /*
> > +              * Note: this will account forceidle to the current cpu, even
> > +              * if it comes from our SMT sibling.
> > +              */
> > +             account_forceidle_time(p, delta);
> >       }
>
> AFAICT this is the only caller of that function.
>
> >  }
> >
> > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> > index 78a233d43757..598d1026d629 100644
> > --- a/kernel/sched/cputime.c
> > +++ b/kernel/sched/cputime.c
> > @@ -226,6 +226,17 @@ void account_idle_time(u64 cputime)
> >               cpustat[CPUTIME_IDLE] += cputime;
> >  }
> >
> > +
> > +#ifdef CONFIG_SCHED_CORE
> > +/* Account for forceidle time due to core scheduling. */
> > +void account_forceidle_time(struct task_struct *p, u64 delta)
> > +{
> > +     schedstat_add(p->stats.core_forceidle_sum, delta);
>
> But then you loose the __, why?

Yea, this is probably better off as __ and a comment on the function
stating that it requires schedstat is enabled. My original thinking
was that it would be nice to avoid capturing this requirement here for
future potential use cases, especially given that the
schedstat_enabled() check is basically free anyway.

> > +
> > +     task_group_account_field(p, CPUTIME_FORCEIDLE, delta);
> > +}
> > +#endif

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-20 23:51 Josh Don
  2022-05-21  1:31 ` kernel test robot
@ 2022-05-23 11:27   ` Dan Carpenter
  2022-05-21  3:19 ` kernel test robot
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2022-05-23 11:27 UTC (permalink / raw)
  To: kbuild, Josh Don, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Tejun Heo
  Cc: lkp, kbuild-all, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	linux-kernel, Cruz Zhao, Josh Don

Hi Josh,

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205211525.XlF6P8dM-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 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/cgroup/rstat.c:489 cgroup_base_stat_cputime_show() error: uninitialized symbol 'forceidle_time'.

vim +/forceidle_time +489 kernel/cgroup/rstat.c

d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462  	struct cgroup *cgrp = seq_css(seq)->cgroup;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463  	u64 usage, utime, stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464  	struct cgroup_base_stat bstat;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465  	u64 __maybe_unused forceidle_time;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467  	if (cgroup_parent(cgrp)) {
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468  		cgroup_rstat_flush_hold(cgrp);
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469  		usage = cgrp->bstat.cputime.sum_exec_runtime;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470  		cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471  			       &utime, &stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473  		forceidle_time = cgrp->bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475  		cgroup_rstat_flush_release();
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476  	} else {
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477  		root_cgroup_cputime(&bstat);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478  		usage = bstat.cputime.sum_exec_runtime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479  		utime = bstat.cputime.utime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480  		stime = bstat.cputime.stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  482  		forceidle_time = bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484  	}
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485  
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486  	do_div(usage, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487  	do_div(utime, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488  	do_div(stime, NSEC_PER_USEC);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @489  	do_div(forceidle_time, NSEC_PER_USEC);

I think this will cause MEMSan warnings at run time.

041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490  
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491  	seq_printf(seq, "usage_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492  		   "user_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493  		   "system_usec %llu\n",
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494  		   usage, utime, stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495  

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


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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
@ 2022-05-23 11:27   ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2022-05-23 11:27 UTC (permalink / raw)
  To: kbuild-all

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

Hi Josh,

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205211525.XlF6P8dM-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 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/cgroup/rstat.c:489 cgroup_base_stat_cputime_show() error: uninitialized symbol 'forceidle_time'.

vim +/forceidle_time +489 kernel/cgroup/rstat.c

d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462  	struct cgroup *cgrp = seq_css(seq)->cgroup;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463  	u64 usage, utime, stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464  	struct cgroup_base_stat bstat;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465  	u64 __maybe_unused forceidle_time;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467  	if (cgroup_parent(cgrp)) {
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468  		cgroup_rstat_flush_hold(cgrp);
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469  		usage = cgrp->bstat.cputime.sum_exec_runtime;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470  		cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471  			       &utime, &stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473  		forceidle_time = cgrp->bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475  		cgroup_rstat_flush_release();
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476  	} else {
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477  		root_cgroup_cputime(&bstat);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478  		usage = bstat.cputime.sum_exec_runtime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479  		utime = bstat.cputime.utime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480  		stime = bstat.cputime.stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  482  		forceidle_time = bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484  	}
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485  
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486  	do_div(usage, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487  	do_div(utime, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488  	do_div(stime, NSEC_PER_USEC);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @489  	do_div(forceidle_time, NSEC_PER_USEC);

I think this will cause MEMSan warnings at run time.

041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490  
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491  	seq_printf(seq, "usage_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492  		   "user_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493  		   "system_usec %llu\n",
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494  		   usage, utime, stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495  

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

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-20 23:51 Josh Don
                   ` (2 preceding siblings ...)
  2022-05-21  3:19 ` kernel test robot
@ 2022-05-21 10:00 ` Peter Zijlstra
  2022-05-23 21:19   ` Josh Don
  2022-05-23 11:27   ` Dan Carpenter
  4 siblings, 1 reply; 12+ messages in thread
From: Peter Zijlstra @ 2022-05-21 10:00 UTC (permalink / raw)
  To: Josh Don
  Cc: Ingo Molnar, Juri Lelli, Vincent Guittot, Tejun Heo,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
	Cruz Zhao

On Fri, May 20, 2022 at 04:51:38PM -0700, Josh Don wrote:

> diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
> index 38a2cec21014..ddef2b8ddf68 100644
> --- a/kernel/sched/core_sched.c
> +++ b/kernel/sched/core_sched.c
> @@ -277,7 +277,11 @@ void __sched_core_account_forceidle(struct rq *rq)
>  		if (p == rq_i->idle)
>  			continue;
>  
> -		__schedstat_add(p->stats.core_forceidle_sum, delta);
> +		/*
> +		 * Note: this will account forceidle to the current cpu, even
> +		 * if it comes from our SMT sibling.
> +		 */
> +		account_forceidle_time(p, delta);
>  	}

AFAICT this is the only caller of that function.

>  }
>  
> diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> index 78a233d43757..598d1026d629 100644
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -226,6 +226,17 @@ void account_idle_time(u64 cputime)
>  		cpustat[CPUTIME_IDLE] += cputime;
>  }
>  
> +
> +#ifdef CONFIG_SCHED_CORE
> +/* Account for forceidle time due to core scheduling. */
> +void account_forceidle_time(struct task_struct *p, u64 delta)
> +{
> +	schedstat_add(p->stats.core_forceidle_sum, delta);

But then you loose the __, why? 

> +
> +	task_group_account_field(p, CPUTIME_FORCEIDLE, delta);
> +}
> +#endif

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
@ 2022-05-23 11:27   ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-05-21  7:32 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220520235138.3140590-1-joshdon@google.com>
References: <20220520235138.3140590-1-joshdon@google.com>
TO: Josh Don <joshdon@google.com>
TO: Ingo Molnar <mingo@redhat.com>
TO: Peter Zijlstra <peterz@infradead.org>
TO: Juri Lelli <juri.lelli@redhat.com>
TO: Vincent Guittot <vincent.guittot@linaro.org>
TO: Tejun Heo <tj@kernel.org>
CC: Dietmar Eggemann <dietmar.eggemann@arm.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ben Segall <bsegall@google.com>
CC: Mel Gorman <mgorman@suse.de>
CC: Daniel Bristot de Oliveira <bristot@redhat.com>
CC: Valentin Schneider <vschneid@redhat.com>
CC: linux-kernel(a)vger.kernel.org
CC: Cruz Zhao <CruzZhao@linux.alibaba.com>
CC: Josh Don <joshdon@google.com>

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on tip/sched/core tip/master v5.18-rc7 next-20220520]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205211525.XlF6P8dM-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 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/cgroup/rstat.c:489 cgroup_base_stat_cputime_show() error: uninitialized symbol 'forceidle_time'.

vim +/forceidle_time +489 kernel/cgroup/rstat.c

936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  459  
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  460  void cgroup_base_stat_cputime_show(struct seq_file *seq)
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  461  {
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  462  	struct cgroup *cgrp = seq_css(seq)->cgroup;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  463  	u64 usage, utime, stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  464  	struct cgroup_base_stat bstat;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  465  	u64 __maybe_unused forceidle_time;
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  466  
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  467  	if (cgroup_parent(cgrp)) {
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  468  		cgroup_rstat_flush_hold(cgrp);
d4ff749b5e0f1e kernel/cgroup/rstat.c Tejun Heo    2018-04-26  469  		usage = cgrp->bstat.cputime.sum_exec_runtime;
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  470  		cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  471  			       &utime, &stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  472  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  473  		forceidle_time = cgrp->bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  474  #endif
6162cef0f741c7 kernel/cgroup/rstat.c Tejun Heo    2018-04-26  475  		cgroup_rstat_flush_release();
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  476  	} else {
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  477  		root_cgroup_cputime(&bstat);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  478  		usage = bstat.cputime.sum_exec_runtime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  479  		utime = bstat.cputime.utime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  480  		stime = bstat.cputime.stime;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  481  #ifdef CONFIG_SCHED_CORE
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  482  		forceidle_time = bstat.forceidle_sum;
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  483  #endif
936f2a70f2077f kernel/cgroup/rstat.c Boris Burkov 2020-05-27  484  	}
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  485  
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  486  	do_div(usage, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  487  	do_div(utime, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  488  	do_div(stime, NSEC_PER_USEC);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20 @489  	do_div(forceidle_time, NSEC_PER_USEC);
041cd640b2f3c5 kernel/cgroup/stat.c  Tejun Heo    2017-09-25  490  
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  491  	seq_printf(seq, "usage_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  492  		   "user_usec %llu\n"
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  493  		   "system_usec %llu\n",
d41bf8c9deaed1 kernel/cgroup/stat.c  Tejun Heo    2017-10-23  494  		   usage, utime, stime);
0575a42c9f10cd kernel/cgroup/rstat.c Josh Don     2022-05-20  495  

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

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-20 23:51 Josh Don
  2022-05-21  1:31 ` kernel test robot
  2022-05-21  2:38 ` kernel test robot
@ 2022-05-21  3:19 ` kernel test robot
  2022-05-21 10:00 ` Peter Zijlstra
  2022-05-23 11:27   ` Dan Carpenter
  4 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-05-21  3:19 UTC (permalink / raw)
  To: Josh Don, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Tejun Heo
  Cc: kbuild-all, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	linux-kernel, Cruz Zhao, Josh Don

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on tip/sched/core tip/master v5.18-rc7 next-20220520]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220521/202205211108.a5tqwV7v-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/0575a42c9f10cda618b09b949cc42fe97abea479
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
        git checkout 0575a42c9f10cda618b09b949cc42fe97abea479
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash kernel/cgroup/

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/math.h:6,
                    from include/linux/math64.h:6,
                    from include/linux/time64.h:5,
                    from include/linux/restart_block.h:10,
                    from include/linux/thread_info.h:14,
                    from include/asm-generic/current.h:5,
                    from ./arch/um/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/rstat.c:2:
   kernel/cgroup/rstat.c: In function 'cgroup_base_stat_cputime_show':
>> arch/x86/include/asm/div64.h:30:17: warning: 'forceidle_time' is used uninitialized [-Wuninitialized]
      30 |                 asm("" : "=a" (__low), "=d" (__high) : "A" (n));\
         |                 ^~~
   kernel/cgroup/rstat.c:465:28: note: 'forceidle_time' was declared here
     465 |         u64 __maybe_unused forceidle_time;
         |                            ^~~~~~~~~~~~~~


vim +/forceidle_time +30 arch/x86/include/asm/div64.h

428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20   9  
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  10  /*
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  11   * do_div() is NOT a C function. It wants to return
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  12   * two values (the quotient and the remainder), but
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  13   * since that doesn't work very well in C, what it
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  14   * does is:
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  15   *
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  16   * - modifies the 64-bit dividend _in_place_
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  17   * - returns the 32-bit remainder
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  18   *
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  19   * This ends up being the most efficient "calling
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  20   * convention" on x86.
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  21   */
925a09b27fc735 include/asm-x86/div64.h      Joe Perches               2008-03-23  22  #define do_div(n, base)						\
925a09b27fc735 include/asm-x86/div64.h      Joe Perches               2008-03-23  23  ({								\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  24  	unsigned long __upper, __low, __high, __mod, __base;	\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  25  	__base = (base);					\
668b4484660618 arch/x86/include/asm/div64.h Sebastian Andrzej Siewior 2011-11-30  26  	if (__builtin_constant_p(__base) && is_power_of_2(__base)) { \
668b4484660618 arch/x86/include/asm/div64.h Sebastian Andrzej Siewior 2011-11-30  27  		__mod = n & (__base - 1);			\
668b4484660618 arch/x86/include/asm/div64.h Sebastian Andrzej Siewior 2011-11-30  28  		n >>= ilog2(__base);				\
668b4484660618 arch/x86/include/asm/div64.h Sebastian Andrzej Siewior 2011-11-30  29  	} else {						\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20 @30  		asm("" : "=a" (__low), "=d" (__high) : "A" (n));\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  31  		__upper = __high;				\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  32  		if (__high) {					\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  33  			__upper = __high % (__base);		\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  34  			__high = __high / (__base);		\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  35  		}						\
925a09b27fc735 include/asm-x86/div64.h      Joe Perches               2008-03-23  36  		asm("divl %2" : "=a" (__low), "=d" (__mod)	\
925a09b27fc735 include/asm-x86/div64.h      Joe Perches               2008-03-23  37  			: "rm" (__base), "0" (__low), "1" (__upper));	\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  38  		asm("" : "=A" (n) : "a" (__low), "d" (__high));	\
668b4484660618 arch/x86/include/asm/div64.h Sebastian Andrzej Siewior 2011-11-30  39  	}							\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  40  	__mod;							\
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  41  })
428c5a2339f6d5 include/asm-x86/div64.h      Chris Snook               2007-10-20  42  

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

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-20 23:51 Josh Don
  2022-05-21  1:31 ` kernel test robot
@ 2022-05-21  2:38 ` kernel test robot
  2022-05-21  3:19 ` kernel test robot
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-05-21  2:38 UTC (permalink / raw)
  To: Josh Don, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Tejun Heo
  Cc: llvm, kbuild-all, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	linux-kernel, Cruz Zhao, Josh Don

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on tip/sched/core tip/master v5.18-rc7 next-20220520]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: hexagon-randconfig-r033-20220519 (https://download.01.org/0day-ci/archive/20220521/202205211029.u32ZBjjj-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b369762beb70dfef22c7e793aed79b94d7dc0757)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/0575a42c9f10cda618b09b949cc42fe97abea479
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
        git checkout 0575a42c9f10cda618b09b949cc42fe97abea479
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/cgroup/

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

All warnings (new ones prefixed by >>):

>> kernel/cgroup/rstat.c:489:9: warning: variable 'forceidle_time' is uninitialized when used here [-Wuninitialized]
           do_div(forceidle_time, NSEC_PER_USEC);
                  ^~~~~~~~~~~~~~
   include/asm-generic/div64.h:225:12: note: expanded from macro 'do_div'
                   __rem = (n) & (__base - 1);             \
                            ^
   kernel/cgroup/rstat.c:465:35: note: initialize the variable 'forceidle_time' to silence this warning
           u64 __maybe_unused forceidle_time;
                                            ^
                                             = 0
   1 warning generated.


vim +/forceidle_time +489 kernel/cgroup/rstat.c

   459	
   460	void cgroup_base_stat_cputime_show(struct seq_file *seq)
   461	{
   462		struct cgroup *cgrp = seq_css(seq)->cgroup;
   463		u64 usage, utime, stime;
   464		struct cgroup_base_stat bstat;
   465		u64 __maybe_unused forceidle_time;
   466	
   467		if (cgroup_parent(cgrp)) {
   468			cgroup_rstat_flush_hold(cgrp);
   469			usage = cgrp->bstat.cputime.sum_exec_runtime;
   470			cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
   471				       &utime, &stime);
   472	#ifdef CONFIG_SCHED_CORE
   473			forceidle_time = cgrp->bstat.forceidle_sum;
   474	#endif
   475			cgroup_rstat_flush_release();
   476		} else {
   477			root_cgroup_cputime(&bstat);
   478			usage = bstat.cputime.sum_exec_runtime;
   479			utime = bstat.cputime.utime;
   480			stime = bstat.cputime.stime;
   481	#ifdef CONFIG_SCHED_CORE
   482			forceidle_time = bstat.forceidle_sum;
   483	#endif
   484		}
   485	
   486		do_div(usage, NSEC_PER_USEC);
   487		do_div(utime, NSEC_PER_USEC);
   488		do_div(stime, NSEC_PER_USEC);
 > 489		do_div(forceidle_time, NSEC_PER_USEC);
   490	
   491		seq_printf(seq, "usage_usec %llu\n"
   492			   "user_usec %llu\n"
   493			   "system_usec %llu\n",
   494			   usage, utime, stime);
   495	

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

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

* Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
  2022-05-20 23:51 Josh Don
@ 2022-05-21  1:31 ` kernel test robot
  2022-05-21  2:38 ` kernel test robot
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-05-21  1:31 UTC (permalink / raw)
  To: Josh Don, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Tejun Heo
  Cc: kbuild-all, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira, Valentin Schneider,
	linux-kernel, Cruz Zhao, Josh Don

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on tip/sched/core tip/master v5.18-rc7 next-20220520]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220521/202205210945.s3TGKFfR-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/0575a42c9f10cda618b09b949cc42fe97abea479
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Josh-Don/sched-core-add-forced-idle-accounting-for-cgroups/20220521-075311
        git checkout 0575a42c9f10cda618b09b949cc42fe97abea479
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/math.h:6,
                    from include/linux/math64.h:6,
                    from include/linux/time64.h:5,
                    from include/linux/restart_block.h:10,
                    from include/linux/thread_info.h:14,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/cgroup.h:12,
                    from kernel/cgroup/cgroup-internal.h:5,
                    from kernel/cgroup/rstat.c:2:
   kernel/cgroup/rstat.c: In function 'cgroup_base_stat_cputime_show':
>> arch/m68k/include/asm/div64.h:21:17: warning: 'forceidle_time' is used uninitialized [-Wuninitialized]
      21 |         __n.n64 = (n);                                          \
         |                 ^
   kernel/cgroup/rstat.c:465:28: note: 'forceidle_time' was declared here
     465 |         u64 __maybe_unused forceidle_time;
         |                            ^~~~~~~~~~~~~~


vim +/forceidle_time +21 arch/m68k/include/asm/div64.h

d20f5aa338dc75 Greg Ungerer   2009-02-06  12  
d20f5aa338dc75 Greg Ungerer   2009-02-06  13  #define do_div(n, base) ({					\
d20f5aa338dc75 Greg Ungerer   2009-02-06  14  	union {							\
d20f5aa338dc75 Greg Ungerer   2009-02-06  15  		unsigned long n32[2];				\
d20f5aa338dc75 Greg Ungerer   2009-02-06  16  		unsigned long long n64;				\
d20f5aa338dc75 Greg Ungerer   2009-02-06  17  	} __n;							\
d20f5aa338dc75 Greg Ungerer   2009-02-06  18  	unsigned long __rem, __upper;				\
ea077b1b96e073 Andreas Schwab 2013-08-09  19  	unsigned long __base = (base);				\
d20f5aa338dc75 Greg Ungerer   2009-02-06  20  								\
d20f5aa338dc75 Greg Ungerer   2009-02-06 @21  	__n.n64 = (n);						\
d20f5aa338dc75 Greg Ungerer   2009-02-06  22  	if ((__upper = __n.n32[0])) {				\
d20f5aa338dc75 Greg Ungerer   2009-02-06  23  		asm ("divul.l %2,%1:%0"				\
d20f5aa338dc75 Greg Ungerer   2009-02-06  24  		     : "=d" (__n.n32[0]), "=d" (__upper)	\
ea077b1b96e073 Andreas Schwab 2013-08-09  25  		     : "d" (__base), "0" (__n.n32[0]));		\
d20f5aa338dc75 Greg Ungerer   2009-02-06  26  	}							\
d20f5aa338dc75 Greg Ungerer   2009-02-06  27  	asm ("divu.l %2,%1:%0"					\
d20f5aa338dc75 Greg Ungerer   2009-02-06  28  	     : "=d" (__n.n32[1]), "=d" (__rem)			\
ea077b1b96e073 Andreas Schwab 2013-08-09  29  	     : "d" (__base), "1" (__upper), "0" (__n.n32[1]));	\
d20f5aa338dc75 Greg Ungerer   2009-02-06  30  	(n) = __n.n64;						\
d20f5aa338dc75 Greg Ungerer   2009-02-06  31  	__rem;							\
d20f5aa338dc75 Greg Ungerer   2009-02-06  32  })
d20f5aa338dc75 Greg Ungerer   2009-02-06  33  

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

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

* [PATCH v2] sched/core: add forced idle accounting for cgroups
@ 2022-05-20 23:51 Josh Don
  2022-05-21  1:31 ` kernel test robot
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Josh Don @ 2022-05-20 23:51 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot, Tejun Heo
  Cc: Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
	Cruz Zhao, Josh Don

4feee7d1260 previously added per-task forced idle accounting. This patch
extends this to also include cgroups.

rstat is used for cgroup accounting, except for the root, which uses
kcpustat in order to bypass the need for doing an rstat flush when
reading root stats.

Only cgroup v2 is supported. Similar to the task accounting, the cgroup
accounting requires that schedstats is enabled.

Signed-off-by: Josh Don <joshdon@google.com>
---
v2: Per Tejun's suggestion, move the forceidle stat to cgroup_base_stat
directly.

 include/linux/cgroup-defs.h |  4 ++++
 include/linux/kernel_stat.h |  7 +++++++
 kernel/cgroup/rstat.c       | 40 +++++++++++++++++++++++++++++++------
 kernel/sched/core_sched.c   |  6 +++++-
 kernel/sched/cputime.c      | 11 ++++++++++
 5 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 1bfcfb1af352..025fd0e84a31 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -287,6 +287,10 @@ struct css_set {
 
 struct cgroup_base_stat {
 	struct task_cputime cputime;
+
+#ifdef CONFIG_SCHED_CORE
+	u64 forceidle_sum;
+#endif
 };
 
 /*
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 69ae6b278464..94f435ce1df0 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,6 +28,9 @@ enum cpu_usage_stat {
 	CPUTIME_STEAL,
 	CPUTIME_GUEST,
 	CPUTIME_GUEST_NICE,
+#ifdef CONFIG_SCHED_CORE
+	CPUTIME_FORCEIDLE,
+#endif
 	NR_STATS,
 };
 
@@ -115,4 +118,8 @@ extern void account_process_tick(struct task_struct *, int user);
 
 extern void account_idle_ticks(unsigned long ticks);
 
+#ifdef CONFIG_SCHED_CORE
+extern void account_forceidle_time(struct task_struct *tsk, u64 delta);
+#endif
+
 #endif /* _LINUX_KERNEL_STAT_H */
diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c
index 24b5c2ab5598..d873de6f8716 100644
--- a/kernel/cgroup/rstat.c
+++ b/kernel/cgroup/rstat.c
@@ -310,6 +310,9 @@ static void cgroup_base_stat_add(struct cgroup_base_stat *dst_bstat,
 	dst_bstat->cputime.utime += src_bstat->cputime.utime;
 	dst_bstat->cputime.stime += src_bstat->cputime.stime;
 	dst_bstat->cputime.sum_exec_runtime += src_bstat->cputime.sum_exec_runtime;
+#ifdef CONFIG_SCHED_CORE
+	dst_bstat->forceidle_sum += src_bstat->forceidle_sum;
+#endif
 }
 
 static void cgroup_base_stat_sub(struct cgroup_base_stat *dst_bstat,
@@ -318,6 +321,9 @@ static void cgroup_base_stat_sub(struct cgroup_base_stat *dst_bstat,
 	dst_bstat->cputime.utime -= src_bstat->cputime.utime;
 	dst_bstat->cputime.stime -= src_bstat->cputime.stime;
 	dst_bstat->cputime.sum_exec_runtime -= src_bstat->cputime.sum_exec_runtime;
+#ifdef CONFIG_SCHED_CORE
+	dst_bstat->forceidle_sum -= src_bstat->forceidle_sum;
+#endif
 }
 
 static void cgroup_base_stat_flush(struct cgroup *cgrp, int cpu)
@@ -398,6 +404,11 @@ void __cgroup_account_cputime_field(struct cgroup *cgrp,
 	case CPUTIME_SOFTIRQ:
 		rstatc->bstat.cputime.stime += delta_exec;
 		break;
+#ifdef CONFIG_SCHED_CORE
+	case CPUTIME_FORCEIDLE:
+		rstatc->bstat.forceidle_sum += delta_exec;
+		break;
+#endif
 	default:
 		break;
 	}
@@ -411,8 +422,9 @@ void __cgroup_account_cputime_field(struct cgroup *cgrp,
  * with how it is done by __cgroup_account_cputime_field for each bit of
  * cpu time attributed to a cgroup.
  */
-static void root_cgroup_cputime(struct task_cputime *cputime)
+static void root_cgroup_cputime(struct cgroup_base_stat *bstat)
 {
+	struct task_cputime *cputime = &bstat->cputime;
 	int i;
 
 	cputime->stime = 0;
@@ -438,6 +450,10 @@ static void root_cgroup_cputime(struct task_cputime *cputime)
 		cputime->sum_exec_runtime += user;
 		cputime->sum_exec_runtime += sys;
 		cputime->sum_exec_runtime += cpustat[CPUTIME_STEAL];
+
+#ifdef CONFIG_SCHED_CORE
+		bstat->forceidle_sum += cpustat[CPUTIME_FORCEIDLE];
+#endif
 	}
 }
 
@@ -445,27 +461,39 @@ void cgroup_base_stat_cputime_show(struct seq_file *seq)
 {
 	struct cgroup *cgrp = seq_css(seq)->cgroup;
 	u64 usage, utime, stime;
-	struct task_cputime cputime;
+	struct cgroup_base_stat bstat;
+	u64 __maybe_unused forceidle_time;
 
 	if (cgroup_parent(cgrp)) {
 		cgroup_rstat_flush_hold(cgrp);
 		usage = cgrp->bstat.cputime.sum_exec_runtime;
 		cputime_adjust(&cgrp->bstat.cputime, &cgrp->prev_cputime,
 			       &utime, &stime);
+#ifdef CONFIG_SCHED_CORE
+		forceidle_time = cgrp->bstat.forceidle_sum;
+#endif
 		cgroup_rstat_flush_release();
 	} else {
-		root_cgroup_cputime(&cputime);
-		usage = cputime.sum_exec_runtime;
-		utime = cputime.utime;
-		stime = cputime.stime;
+		root_cgroup_cputime(&bstat);
+		usage = bstat.cputime.sum_exec_runtime;
+		utime = bstat.cputime.utime;
+		stime = bstat.cputime.stime;
+#ifdef CONFIG_SCHED_CORE
+		forceidle_time = bstat.forceidle_sum;
+#endif
 	}
 
 	do_div(usage, NSEC_PER_USEC);
 	do_div(utime, NSEC_PER_USEC);
 	do_div(stime, NSEC_PER_USEC);
+	do_div(forceidle_time, NSEC_PER_USEC);
 
 	seq_printf(seq, "usage_usec %llu\n"
 		   "user_usec %llu\n"
 		   "system_usec %llu\n",
 		   usage, utime, stime);
+
+#ifdef CONFIG_SCHED_CORE
+	seq_printf(seq, "forceidle_usec %llu\n", forceidle_time);
+#endif
 }
diff --git a/kernel/sched/core_sched.c b/kernel/sched/core_sched.c
index 38a2cec21014..ddef2b8ddf68 100644
--- a/kernel/sched/core_sched.c
+++ b/kernel/sched/core_sched.c
@@ -277,7 +277,11 @@ void __sched_core_account_forceidle(struct rq *rq)
 		if (p == rq_i->idle)
 			continue;
 
-		__schedstat_add(p->stats.core_forceidle_sum, delta);
+		/*
+		 * Note: this will account forceidle to the current cpu, even
+		 * if it comes from our SMT sibling.
+		 */
+		account_forceidle_time(p, delta);
 	}
 }
 
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 78a233d43757..598d1026d629 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -226,6 +226,17 @@ void account_idle_time(u64 cputime)
 		cpustat[CPUTIME_IDLE] += cputime;
 }
 
+
+#ifdef CONFIG_SCHED_CORE
+/* Account for forceidle time due to core scheduling. */
+void account_forceidle_time(struct task_struct *p, u64 delta)
+{
+	schedstat_add(p->stats.core_forceidle_sum, delta);
+
+	task_group_account_field(p, CPUTIME_FORCEIDLE, delta);
+}
+#endif
+
 /*
  * When a guest is interrupted for a longer amount of time, missed clock
  * ticks are not redelivered later. Due to that, this function may on
-- 
2.36.1.124.g0e6072fb45-goog


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

end of thread, other threads:[~2022-05-23 21:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22  6:35 [PATCH v2] sched/core: add forced idle accounting for cgroups kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-05-20 23:51 Josh Don
2022-05-21  1:31 ` kernel test robot
2022-05-21  2:38 ` kernel test robot
2022-05-21  3:19 ` kernel test robot
2022-05-21 10:00 ` Peter Zijlstra
2022-05-23 21:19   ` Josh Don
2022-05-23 11:27 ` Dan Carpenter
2022-05-21  7:32   ` kernel test robot
2022-05-23 11:27   ` Dan Carpenter
2022-05-23 21:20   ` Josh Don
2022-05-23 21:20     ` Josh Don

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.