Re: [PATCH] kernel/sched/core: Print the time when the process entered the D state

From: kernel test robot
Date: Fri Jul 09 2021 - 02:54:32 EST


Hi zhouchuangao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on tip/master linux/master linus/master v5.13 next-20210709]
[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/0day-ci/linux/commits/zhouchuangao/kernel-sched-core-Print-the-time-when-the-process-entered-the-D-state/20210709-130636
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 031e3bd8986fffe31e1ddbf5264cccfe30c9abd7
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/287f10f679a0c30c4ac57abb8a36e698619554d5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review zhouchuangao/kernel-sched-core-Print-the-time-when-the-process-entered-the-D-state/20210709-130636
git checkout 287f10f679a0c30c4ac57abb8a36e698619554d5
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/sched/

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

All errors (new ones prefixed by >>):

kernel/sched/core.c: In function 'ttwu_stat':
kernel/sched/core.c:3267:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
3267 | struct rq *rq;
| ^~
In file included from include/linux/kernel.h:17,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
kernel/sched/core.c: In function 'sched_show_task':
>> kernel/sched/core.c:8158:16: error: 'struct sched_info' has no member named 'last_arrival'
8158 | p->sched_info.last_arrival);
| ^
include/linux/printk.h:385:26: note: in definition of macro 'pr_cont'
385 | printk(KERN_CONT fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~


vim +8158 kernel/sched/core.c

8134
8135 void sched_show_task(struct task_struct *p)
8136 {
8137 unsigned long free = 0;
8138 int ppid;
8139
8140 if (!try_get_task_stack(p))
8141 return;
8142
8143 pr_info("task:%-15.15s state:%c", p->comm, task_state_to_char(p));
8144
8145 if (task_is_running(p))
8146 pr_cont(" running task ");
8147 #ifdef CONFIG_DEBUG_STACK_USAGE
8148 free = stack_not_used(p);
8149 #endif
8150 ppid = 0;
8151 rcu_read_lock();
8152 if (pid_alive(p))
8153 ppid = task_pid_nr(rcu_dereference(p->real_parent));
8154 rcu_read_unlock();
8155 pr_cont(" stack:%5lu pid:%5d ppid:%6d flags:0x%08lx sched:%llu\n",
8156 free, task_pid_nr(p), ppid,
8157 (unsigned long)task_thread_info(p)->flags,
> 8158 p->sched_info.last_arrival);
8159
8160 print_worker_info(KERN_INFO, p);
8161 print_stop_info(KERN_INFO, p);
8162 show_stack(p, NULL, KERN_INFO);
8163 put_task_stack(p);
8164 }
8165 EXPORT_SYMBOL_GPL(sched_show_task);
8166

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

Attachment: .config.gz
Description: application/gzip