linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giovanni Gherdovich <ggherdovich@suse.cz>
To: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@01.org, Mike Galbraith <mgalbraith@suse.de>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.com>,
	mgorman@techsingularity.net
Subject: Re: [PATCH] sched/cputime: Mitigate performance regression in times()/clock_gettime()
Date: Wed, 27 Jul 2016 13:41:22 +0200	[thread overview]
Message-ID: <1469619682.1808.4.camel@suse.cz> (raw)
In-Reply-To: <201607262207.9FrBoX2i%fengguang.wu@intel.com>

On Tue, 2016-07-26 at 22:43 +0800, kbuild test robot wrote:
> Hi,
> 
> [auto build test ERROR on tip/sched/core]
> [also build test ERROR on v4.7 next-20160726]
> [if your patch is applied to the wrong git tree, please drop us a
> note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Giovanni-Gherdovich/
> sched-cputime-Mitigate-performance-regression-in-times
> -clock_gettime/20160726-221216
> config: mips-allyesconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tes
> ts.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=mips 
> 
> All errors (new ones prefixed by >>):
> 
>    kernel/sched/core.c: In function 'task_sched_runtime':
> > > kernel/sched/core.c:3009:3: error: implicit declaration of
> > > function 'prefetch' [-Werror=implicit-function-declaration]
>       prefetch((&p->se)->cfs_rq->curr);
>       ^
>    cc1: some warnings being treated as errors
>    make[2]: *** [kernel/sched/core.o] Error 1
>    make[2]: Target '__build' not remade because of errors.
>    make[1]: *** [kernel/sched/] Error 2
> 
> vim +/prefetch +3009 kernel/sched/core.c
> 
>   3003		 * Must be ->curr _and_ ->on_rq.  If dequeued,
> we would
>   3004		 * project cycles that may never be accounted
> to this
>   3005		 * thread, breaking clock_gettime().
>   3006		 */
>   3007		if (task_current(rq, p) &&
> task_on_rq_queued(p)) {
>   3008	#if defined(CONFIG_FAIR_GROUP_SCHED)
> > 3009			prefetch((&p->se)->cfs_rq->curr);
>   3010			prefetch(&(&p->se)->cfs_rq->curr
> ->exec_start);
>   3011	#endif
>   3012			update_rq_clock(rq);
> 
> ---
> 0-DAY kernel test infrastructure                Open Source
> Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Cor
> poration


As the robot pointed out, I forgot the appropriate header file. On x86
it compiled as the declaration must have come via an indirect header
file inclusion.

I will wait a few days for more comments, then I'll send a v2
addressing the missing #include with the following change:

-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fde4014..97c196d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -74,6 +74,7 @@
 #include <linux/context_tracking.h>
 #include <linux/compiler.h>
 #include <linux/frame.h>
+#include <linux/prefetch.h>
 
 #include <asm/switch_to.h>
 #include <asm/tlb.h>
-- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 -- -- >8 

Regards,
Giovanni Gherdovich
SUSE Labs

  reply	other threads:[~2016-07-27 11:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 14:07 [PATCH] sched/cputime: Mitigate performance regression in times()/clock_gettime() Giovanni Gherdovich
2016-07-26 14:43 ` kbuild test robot
2016-07-27 11:41   ` Giovanni Gherdovich [this message]
2016-08-02 10:37 ` Peter Zijlstra
2016-08-02 13:26   ` Mike Galbraith
2016-08-02 22:04   ` Giovanni Gherdovich
2016-08-03 10:02     ` Peter Zijlstra
2016-08-03 10:34       ` Peter Zijlstra
2016-08-05  7:58         ` Giovanni Gherdovich

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=1469619682.1808.4.camel@suse.cz \
    --to=ggherdovich@suse.cz \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgalbraith@suse.de \
    --cc=mgorman@suse.com \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sgruszka@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 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).