public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jiri Olsa <jolsa@kernel.org>, Vinson Lee <vlee@twitter.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Subject: Re: Regression in perf bench numa convergence stats
Date: Wed, 24 Jun 2015 14:49:28 +0200	[thread overview]
Message-ID: <20150624124928.GA3921@gmail.com> (raw)
In-Reply-To: <20150624111004.GA5220@linux.vnet.ibm.com>


* Srikar Dronamraju <srikar@linux.vnet.ibm.com> wrote:

> perf bench numa mem with -c / -m options on v4.1 and latest tip arent
> showing correct convergence statistics. I ran git bisect between v4.0 and
> v4.1. I have included the patch that fixed the problem for me.

> From 88199ad8a3d6495080eaa016b87a612bc742b1c4 Mon Sep 17 00:00:00 2001
> From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Date: Wed, 24 Jun 2015 16:23:22 +0530
> Subject: [PATCH] perf tools:Fix perf_bench to show proper convergence
> 
> With commit: e1e455f (perf tools: Work around lack of sched_getcpu in
> glibc < 2.6), perf_bench numa mem with -c or -m option is not able to
> correctly calculate convergence. With the above commit, sched_getcpu
> always seems to return -1. The intention of commit e1e455f was to add a
> sched_getcpu in glibc < 2.6. Hence keep the sched_getcpu definition
> under an ifdef.
> 
> This regression happened occurred between v4.0 and v4.1
> 
> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> ---
>  tools/perf/util/cloexec.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c
> index 85b5238..2babdda 100644
> --- a/tools/perf/util/cloexec.c
> +++ b/tools/perf/util/cloexec.c
> @@ -7,11 +7,15 @@
>  
>  static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
>  
> +#ifdef __GLIBC_PREREQ
> +#if !__GLIBC_PREREQ(2, 6)
>  int __weak sched_getcpu(void)
>  {
>  	errno = ENOSYS;
>  	return -1;
>  }
> +#endif
> +#endif
>  

Thanks Srikar!

Acked-by: Ingo Molnar <mingo@kernel.org>

	Ingo

  reply	other threads:[~2015-06-24 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 11:10 Regression in perf bench numa convergence stats Srikar Dronamraju
2015-06-24 12:49 ` Ingo Molnar [this message]
2015-06-25 15:30   ` Arnaldo Carvalho de Melo
2015-06-26  8:43 ` [tip:perf/urgent] perf bench numa: Fix to show proper " tip-bot for Srikar Dronamraju

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=20150624124928.GA3921@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=vlee@twitter.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