All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
Date: Sat, 21 May 2022 15:32:29 +0800	[thread overview]
Message-ID: <202205211525.XlF6P8dM-lkp@intel.com> (raw)

[-- 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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
Date: Mon, 23 May 2022 14:27:48 +0300	[thread overview]
Message-ID: <202205211525.XlF6P8dM-lkp@intel.com> (raw)
In-Reply-To: <20220520235138.3140590-1-joshdon@google.com>

[-- 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

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Josh Don <joshdon@google.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Tejun Heo <tj@kernel.org>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org,
	Cruz Zhao <CruzZhao@linux.alibaba.com>,
	Josh Don <joshdon@google.com>
Subject: Re: [PATCH v2] sched/core: add forced idle accounting for cgroups
Date: Mon, 23 May 2022 14:27:48 +0300	[thread overview]
Message-ID: <202205211525.XlF6P8dM-lkp@intel.com> (raw)
In-Reply-To: <20220520235138.3140590-1-joshdon@google.com>

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


             reply	other threads:[~2022-05-21  7:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21  7:32 kernel test robot [this message]
2022-05-23 11:27 ` [PATCH v2] sched/core: add forced idle accounting for cgroups Dan Carpenter
2022-05-23 11:27 ` Dan Carpenter
2022-05-23 21:20 ` Josh Don
2022-05-23 21:20   ` Josh Don
  -- strict thread matches above, loose matches on Subject: below --
2022-05-22  6:35 kernel test robot
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205211525.XlF6P8dM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.