llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] kdb: Adopt scheduler's task clasification
       [not found] <20210916154253.2731609-1-daniel.thompson@linaro.org>
@ 2021-09-17  0:42 ` kernel test robot
  2021-09-17  5:19 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-17  0:42 UTC (permalink / raw)
  To: Daniel Thompson, Jason Wessel, Douglas Anderson
  Cc: llvm, kbuild-all, Xiang wangx, jing yangyang, kgdb-bugreport,
	linux-kernel, patches

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

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

* Re: [PATCH] kdb: Adopt scheduler's task clasification
       [not found] <20210916154253.2731609-1-daniel.thompson@linaro.org>
  2021-09-17  0:42 ` [PATCH] kdb: Adopt scheduler's task clasification kernel test robot
@ 2021-09-17  5:19 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-17  5:19 UTC (permalink / raw)
  To: Daniel Thompson, Jason Wessel, Douglas Anderson
  Cc: llvm, kbuild-all, Xiang wangx, jing yangyang, kgdb-bugreport,
	linux-kernel, patches

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

Hi Daniel,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f]

url:    https://github.com/0day-ci/linux/commits/Daniel-Thompson/kdb-Adopt-scheduler-s-task-clasification/20210917-004549
base:   6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
config: hexagon-randconfig-r001-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 warnings (new ones prefixed by >>):

>> kernel/debug/kdb/kdb_support.c:512:41: warning: variable 'cpu' is uninitialized when used here [-Wuninitialized]
                   if (!kdb_task_has_cpu(p) || kgdb_info[cpu].irq_depth == 1) {
                                                         ^~~
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   kernel/debug/kdb/kdb_support.c:489:9: note: initialize the variable 'cpu' to silence this warning
           int cpu;
                  ^
                   = 0
   1 warning 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: 27402 bytes --]

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

end of thread, other threads:[~2021-09-17  5:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210916154253.2731609-1-daniel.thompson@linaro.org>
2021-09-17  0:42 ` [PATCH] kdb: Adopt scheduler's task clasification kernel test robot
2021-09-17  5:19 ` kernel test robot

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).