linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Thompson <daniel.thompson@linaro.org>,
	Jason Wessel <jason.wessel@windriver.com>,
	Douglas Anderson <dianders@chromium.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Xiang wangx <wangxiang@cdjrlc.com>,
	jing yangyang <jing.yangyang@zte.com.cn>,
	kgdb-bugreport@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, patches@linaro.org
Subject: Re: [PATCH] kdb: Adopt scheduler's task clasification
Date: Fri, 17 Sep 2021 08:42:35 +0800	[thread overview]
Message-ID: <202109170802.zMVIp0aN-lkp@intel.com> (raw)
In-Reply-To: <20210916154253.2731609-1-daniel.thompson@linaro.org>

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

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f]

url:    https://github.com/0day-ci/linux/commits/Daniel-Thompson/kdb-Adopt-scheduler-s-task-clasification/20210917-004549
base:   6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
config: hexagon-buildonly-randconfig-r005-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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/0day-ci/linux/commit/d315f14b7a044983f76f08221be33c2900c58e37
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Daniel-Thompson/kdb-Adopt-scheduler-s-task-clasification/20210917-004549
        git checkout d315f14b7a044983f76f08221be33c2900c58e37
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 

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

All errors (new ones prefixed by >>):

>> kernel/debug/kdb/kdb_support.c:512:41: error: variable 'cpu' is uninitialized when used here [-Werror,-Wuninitialized]
                   if (!kdb_task_has_cpu(p) || kgdb_info[cpu].irq_depth == 1) {
                                                         ^~~
   kernel/debug/kdb/kdb_support.c:489:9: note: initialize the variable 'cpu' to silence this warning
           int cpu;
                  ^
                   = 0
   1 error generated.


vim +/cpu +512 kernel/debug/kdb/kdb_support.c

5d5314d6795f3c1 Jason Wessel      2010-05-20  475  
5d5314d6795f3c1 Jason Wessel      2010-05-20  476  
5d5314d6795f3c1 Jason Wessel      2010-05-20  477  
5d5314d6795f3c1 Jason Wessel      2010-05-20  478  /*
5d5314d6795f3c1 Jason Wessel      2010-05-20  479   * kdb_task_state_char - Return the character that represents the task state.
5d5314d6795f3c1 Jason Wessel      2010-05-20  480   * Inputs:
5d5314d6795f3c1 Jason Wessel      2010-05-20  481   *	p	struct task for the process
5d5314d6795f3c1 Jason Wessel      2010-05-20  482   * Returns:
5d5314d6795f3c1 Jason Wessel      2010-05-20  483   *	One character to represent the task state.
5d5314d6795f3c1 Jason Wessel      2010-05-20  484   */
5d5314d6795f3c1 Jason Wessel      2010-05-20  485  char kdb_task_state_char (const struct task_struct *p)
5d5314d6795f3c1 Jason Wessel      2010-05-20  486  {
5d5314d6795f3c1 Jason Wessel      2010-05-20  487  	unsigned long tmp;
2f064a59a11ff9b Peter Zijlstra    2021-06-11  488  	char state;
2f064a59a11ff9b Peter Zijlstra    2021-06-11  489  	int cpu;
5d5314d6795f3c1 Jason Wessel      2010-05-20  490  
fe557319aa06c23 Christoph Hellwig 2020-06-17  491  	if (!p ||
fe557319aa06c23 Christoph Hellwig 2020-06-17  492  	    copy_from_kernel_nofault(&tmp, (char *)p, sizeof(unsigned long)))
5d5314d6795f3c1 Jason Wessel      2010-05-20  493  		return 'E';
5d5314d6795f3c1 Jason Wessel      2010-05-20  494  
d315f14b7a04498 Daniel Thompson   2021-09-16  495  	state = task_state_to_char((struct task_struct *) p);
d315f14b7a04498 Daniel Thompson   2021-09-16  496  
d315f14b7a04498 Daniel Thompson   2021-09-16  497  	/*
d315f14b7a04498 Daniel Thompson   2021-09-16  498  	 * task_state_to_char() uses I(dle) differently to is_idle_task().
d315f14b7a04498 Daniel Thompson   2021-09-16  499  	 * I(dle) tasks are (U)ninterruptible tasks that do not
d315f14b7a04498 Daniel Thompson   2021-09-16  500  	 * contribute to the load average and have nothing to do with
d315f14b7a04498 Daniel Thompson   2021-09-16  501  	 * code that runs on idle CPUs.
d315f14b7a04498 Daniel Thompson   2021-09-16  502  	 *
d315f14b7a04498 Daniel Thompson   2021-09-16  503  	 * For historic reasons we'd like to reserve I for idle CPUs in
d315f14b7a04498 Daniel Thompson   2021-09-16  504  	 * kdb so we must reclassify (I)dle tasks.
d315f14b7a04498 Daniel Thompson   2021-09-16  505  	 */
d315f14b7a04498 Daniel Thompson   2021-09-16  506  	if (state == 'I')
d315f14b7a04498 Daniel Thompson   2021-09-16  507  		state = 'U';
d315f14b7a04498 Daniel Thompson   2021-09-16  508  
7fc20c5cbdd184f Paul E. McKenney  2011-11-10  509  	if (is_idle_task(p)) {
5d5314d6795f3c1 Jason Wessel      2010-05-20  510  		/* Idle task.  Is it really idle, apart from the kdb
5d5314d6795f3c1 Jason Wessel      2010-05-20  511  		 * interrupt? */
5d5314d6795f3c1 Jason Wessel      2010-05-20 @512  		if (!kdb_task_has_cpu(p) || kgdb_info[cpu].irq_depth == 1) {
5d5314d6795f3c1 Jason Wessel      2010-05-20  513  			if (cpu != kdb_initial_cpu)
5d5314d6795f3c1 Jason Wessel      2010-05-20  514  				state = 'I';	/* idle task */
5d5314d6795f3c1 Jason Wessel      2010-05-20  515  		}
5d5314d6795f3c1 Jason Wessel      2010-05-20  516  	} else if (!p->mm && state == 'S') {
5d5314d6795f3c1 Jason Wessel      2010-05-20  517  		state = 'M';	/* sleeping system daemon */
5d5314d6795f3c1 Jason Wessel      2010-05-20  518  	}
5d5314d6795f3c1 Jason Wessel      2010-05-20  519  	return state;
5d5314d6795f3c1 Jason Wessel      2010-05-20  520  }
5d5314d6795f3c1 Jason Wessel      2010-05-20  521  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24168 bytes --]

  parent reply	other threads:[~2021-09-17  0:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 15:42 [PATCH] kdb: Adopt scheduler's task clasification Daniel Thompson
2021-09-16 16:28 ` Doug Anderson
2021-09-17  8:18   ` Daniel Thompson
2021-09-17 14:36     ` Doug Anderson
2021-09-17  0:42 ` kernel test robot [this message]
2021-09-17  5:19 ` kernel test robot
2021-10-29 17:19 ` [PATCH v2] " Daniel Thompson
2021-10-31  3:49   ` 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=202109170802.zMVIp0aN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=jing.yangyang@zte.com.cn \
    --cc=kbuild-all@lists.01.org \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=patches@linaro.org \
    --cc=wangxiang@cdjrlc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).