Hi Stanislaw,

[auto build test WARNING on tip/sched/core]
[also build test WARNING on next-20160825]
[cannot apply to v4.8-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    
https://github.com/0day-ci/linux/commits/Stanislaw-Gruszka/sched-cputime-sum_exec_runtime-fixes-for-32-bit-cpus/20160901-173835
config: i386-randconfig-x014-201635 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from include/linux/kasan.h:4,
                    from kernel/sched/core.c:29:
   kernel/sched/core.c: In function 'update_sched_runtime':
   kernel/sched/core.c:3013:8: error: 'struct task_struct' has no member named 
'on_cpu'; did you mean 'on_rq'?
     if (!p->on_cpu || !task_on_rq_queued(p))
           ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> kernel/sched/core.c:3013:2: note: in expansion of macro 'if'
     if (!p->on_cpu || !task_on_rq_queued(p))
     ^~
   kernel/sched/core.c:3013:8: error: 'struct task_struct' has no member named 
'on_cpu'; did you mean 'on_rq'?
     if (!p->on_cpu || !task_on_rq_queued(p))
           ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> kernel/sched/core.c:3013:2: note: in expansion of macro 'if'
     if (!p->on_cpu || !task_on_rq_queued(p))
     ^~
   kernel/sched/core.c:3013:8: error: 'struct task_struct' has no member named 
'on_cpu'; did you mean 'on_rq'?
     if (!p->on_cpu || !task_on_rq_queued(p))
           ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> kernel/sched/core.c:3013:2: note: in expansion of macro 'if'
     if (!p->on_cpu || !task_on_rq_queued(p))
     ^~

vim +/if +3013 kernel/sched/core.c

d6a8f295 kernel/sched/core.c Stanislaw Gruszka 2016-09-01  2997  void 
update_sched_runtime(struct task_struct *p)
c5f8d995 kernel/sched.c      Hidetoshi Seto    2009-03-31  2998  {
eb580751 kernel/sched/core.c Peter Zijlstra    2015-07-31  2999         struct 
rq_flags rf;
c5f8d995 kernel/sched.c      Hidetoshi Seto    2009-03-31  3000         struct 
rq *rq;
c5f8d995 kernel/sched.c      Hidetoshi Seto    2009-03-31  3001  
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3002         /*
d6a8f295 kernel/sched/core.c Stanislaw Gruszka 2016-09-01  3003          * 
Optimization to to avoid taking task lock.
d6a8f295 kernel/sched/core.c Stanislaw Gruszka 2016-09-01  3004          *
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3005          * 
Reading ->on_cpu is racy, but this is ok.
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3006          *
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3007          * If 
we race with it leaving cpu, we'll take a lock. So we're correct.
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3008          * If 
we race with it entering cpu, unaccounted time is 0. This is
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3009          * 
indistinguishable from the read occurring a few cycles earlier.
4036ac15 kernel/sched/core.c Mike Galbraith    2014-06-24  3010          * If 
we see ->on_cpu without ->on_rq, the task is leaving, and has
4036ac15 kernel/sched/core.c Mike Galbraith    2014-06-24  3011          * been 
accounted, so we're correct here as well.
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3012          */
da0c1e65 kernel/sched/core.c Kirill Tkhai      2014-08-20 @3013         if 
(!p->on_cpu || !task_on_rq_queued(p))
d6a8f295 kernel/sched/core.c Stanislaw Gruszka 2016-09-01  3014                 
return;
911b2898 kernel/sched/core.c Peter Zijlstra    2013-11-11  3015  
eb580751 kernel/sched/core.c Peter Zijlstra    2015-07-31  3016         rq = 
task_rq_lock(p, &rf);
6e998916 kernel/sched/core.c Stanislaw Gruszka 2014-11-12  3017         /*
6e998916 kernel/sched/core.c Stanislaw Gruszka 2014-11-12  3018          * Must 
be ->curr _and_ ->on_rq.  If dequeued, we would
6e998916 kernel/sched/core.c Stanislaw Gruszka 2014-11-12  3019          * 
project cycles that may never be accounted to this
6e998916 kernel/sched/core.c Stanislaw Gruszka 2014-11-12  3020          * 
thread, breaking clock_gettime().
6e998916 kernel/sched/core.c Stanislaw Gruszka 2014-11-12  3021          */

:::::: The code at line 3013 was first introduced by commit
:::::: da0c1e65b51a289540159663aa4b90ba2366bc21 sched: Add wrapper for checking 
task_struct::on_rq

:::::: TO: Kirill Tkhai <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

Reply via email to