All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Josh Don <joshdon@google.com>, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: 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>, Tejun Heo <tj@kernel.org>,
	Josh Don <joshdon@google.com>
Subject: Re: [PATCH] sched/core: add forced idle accounting for cgroups
Date: Fri, 13 May 2022 14:34:01 +0800	[thread overview]
Message-ID: <202205131429.4xuc9fjB-lkp@intel.com> (raw)
In-Reply-To: <20220513005427.2507335-1-joshdon@google.com>

Hi Josh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/master linux/master linus/master v5.18-rc6 next-20220512]
[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/20220513-085621
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 734387ec2f9d77b00276042b1fa7c95f48ee879d
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220513/202205131429.4xuc9fjB-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/21dca7763777c1985d6f5ac289e6e0c20d429d05
        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/20220513-085621
        git checkout 21dca7763777c1985d6f5ac289e6e0c20d429d05
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/

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

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/build_utility.c:93:
   kernel/sched/core_sched.c: In function 'sched_core_rstat_flush':
   kernel/sched/core_sched.c:306:35: error: invalid use of undefined type 'struct task_group'
     306 |         struct cfs_rq *cfs_rq = tg->cfs_rq[cpu];
         |                                   ^~
   kernel/sched/core_sched.c:307:39: error: invalid use of undefined type 'struct task_group'
     307 |         struct task_group *parent = tg->parent;
         |                                       ^~
   kernel/sched/core_sched.c:319:19: error: invalid use of undefined type 'struct task_group'
     319 |         delta = tg->forceidle_sum_pending;
         |                   ^~
   kernel/sched/core_sched.c:321:19: error: invalid use of undefined type 'struct task_group'
     321 |                 tg->forceidle_sum_pending = 0;
         |                   ^~
   kernel/sched/core_sched.c:333:11: error: invalid use of undefined type 'struct task_group'
     333 |         tg->forceidle_sum += delta;
         |           ^~
   kernel/sched/core_sched.c:334:15: error: invalid use of undefined type 'struct task_group'
     334 |         parent->forceidle_sum_pending += delta;
         |               ^~
>> kernel/sched/core_sched.c:304:56: warning: parameter 'cpu' set but not used [-Wunused-but-set-parameter]
     304 | void sched_core_rstat_flush(struct task_group *tg, int cpu)
         |                                                    ~~~~^~~
   kernel/sched/core_sched.c: In function 'sched_core_forceidle_sum':
   kernel/sched/core_sched.c:340:16: error: invalid use of undefined type 'struct task_group'
     340 |         if (!tg->parent) {
         |                ^~
   kernel/sched/core_sched.c:353:26: error: invalid use of undefined type 'struct task_group'
     353 |                 return tg->forceidle_sum;
         |                          ^~
   kernel/sched/core_sched.c:355:1: error: control reaches end of non-void function [-Werror=return-type]
     355 | }
         | ^
   cc1: some warnings being treated as errors


vim +/cpu +304 kernel/sched/core_sched.c

   303	
 > 304	void sched_core_rstat_flush(struct task_group *tg, int cpu)
   305	{
   306		struct cfs_rq *cfs_rq = tg->cfs_rq[cpu];
   307		struct task_group *parent = tg->parent;
   308		u64 delta, curr_sum;
   309	
   310		/* root uses cpustat */
   311		if (!parent)
   312			return;
   313	
   314		/*
   315		 * Note: cgroup_rstat_lock protects cfs_rq->forceidle_sum_prev and
   316		 * tg->{forceidle_sum, forceidle_sum_pending}.
   317		 */
   318	
   319		delta = tg->forceidle_sum_pending;
   320		if (delta)
 > 321			tg->forceidle_sum_pending = 0;
   322	
   323		/* rq lock not held; value may change concurrently */
   324		curr_sum = READ_ONCE(cfs_rq->forceidle_sum);
   325		if (curr_sum != cfs_rq->forceidle_sum_prev) {
   326			delta += curr_sum - cfs_rq->forceidle_sum_prev;
   327			cfs_rq->forceidle_sum_prev = curr_sum;
   328		}
   329	
   330		if (!delta)
   331			return;
   332	
   333		tg->forceidle_sum += delta;
   334		parent->forceidle_sum_pending += delta;
   335	}
   336	

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

  parent reply	other threads:[~2022-05-13  6:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  0:54 [PATCH] sched/core: add forced idle accounting for cgroups Josh Don
2022-05-13  2:58 ` Tejun Heo
2022-05-13 19:23   ` Josh Don
2022-05-20 18:43     ` Tejun Heo
2022-05-20 23:09       ` Josh Don
2022-05-13  6:34 ` kernel test robot [this message]
2022-05-13  9:09 ` kernel test robot
2022-05-13 11:33 ` kernel test robot

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=202205131429.4xuc9fjB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=CruzZhao@linux.alibaba.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=joshdon@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /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.