mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: andi@firstfloor.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat
Date: Wed, 1 Jul 2009 13:06:20 +0200	[thread overview]
Message-ID: <20090701110620.GB15958@elte.hu> (raw)
In-Reply-To: <20090701.184232.131509470674490734.mitake@dcl.info.waseda.ac.jp>


* Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> wrote:

> From: Ingo Molnar <mingo@elte.hu>
> Subject: Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat
> Date: Wed, 1 Jul 2009 11:07:49 +0200
> 
> > 
> > * Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> wrote:
> > 
> > > From: Andi Kleen <andi@firstfloor.org>
> > > Subject: Re: [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat
> > > Date: Wed, 01 Jul 2009 09:38:04 +0200
> > > 
> > > > Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> writes:
> > > > 
> > > > > Hi,
> > > > >
> > > > > I wrote a test patch which add information of counts processes acquired how many spinlocks to schedstat.
> > > > > After applied this patch, /proc/<PID>/sched will change like this,
> > > > 
> > > > The problem is that spinlocks are very common and schedstats is 
> > > > enabled commonly in production kernels. You would need to 
> > > > demonstrate that such a change doesn't have significant 
> > > > performance impact. For me it looks like it has.
> > > 
> > > I agree with your opinion about performance impact.
> > > I thought this will make no problem,
> > > because schedstat is categorized as "Kernel hacking" section.
> > > But according to you, many production kernels enable it
> > > so my patch will make widespread performance degradation.
> > > I didn't know that, sorry.
> > 
> > His arguments are bogus: both lockstat and perfcounters are optional 
> > (and default off), and the sw counter can be made near zero cost 
> > even if both perfcounters and lockstat is enabled. Also, sw counters 
> > are generally per CPU, etc. so not a performance issue.
> > 
> > The only (small) overhead will be when the lock-acquire sw counter 
> > is actively enabled because you run 'perf stat -e lock-acquire' - 
> > but that is expected and inherent in pretty much any kind of 
> > instrumentation.
> > 
> > The feature you are working on has the chance to be a very useful 
> > and popular piece of instrumentation. Being able to tell the lock 
> > acquire stats on a per task, per workload, per CPU or system-wide 
> > basis is a unique capability no other tool can offer right now.
> > 
> > Andi is often trolling perfcounters related (and other) threads, 
> > please dont let yourself be deterred by that and feel free to ignore 
> > him.
> OK, at least it is truth that
> counter in perfcounters makes only valid overhead.
> 
> And I have a question,
> I tried to build perf, but I got a build error,
> 
> util/symbol.c: In function ‘dso__load_sym’:
> util/symbol.c:466: error: ‘ELF_C_READ_MMAP’ undeclared (first use in this function)
> util/symbol.c:466: error: (Each undeclared identifier is reported only once
> util/symbol.c:466: error: for each function it appears in.)
> 
> I used this libelf,
> http://www.mr511.de/software/english.html
> but constant ELF_C_READ_MMAP is not provided...
> 
> which "libelf" should I use?
> It seems that there are some libelf implementations.

I use the elfutils-libelf* packages:

 elfutils-libelf-devel-static-0.141-1.fc10.i386
 elfutils-0.141-1.fc10.i386
 elfutils-libelf-0.141-1.fc10.i386
 elfutils-libs-0.141-1.fc10.i386
 elfutils-libelf-devel-0.141-1.fc10.i386

do they work fine or you?

	Ingo

  reply	other threads:[~2009-07-01 11:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01  6:21 Hitoshi Mitake
2009-07-01  7:31 ` Ingo Molnar
2009-07-01  8:21   ` Hitoshi Mitake
2009-07-01 13:45   ` Frederic Weisbecker
2009-07-01 13:50     ` Ingo Molnar
2009-07-01 14:17       ` mitake
2009-07-01  7:38 ` Andi Kleen
2009-07-01  8:42   ` Hitoshi Mitake
2009-07-01  9:07     ` Ingo Molnar
2009-07-01  9:42       ` Hitoshi Mitake
2009-07-01 11:06         ` Ingo Molnar [this message]
2009-07-01 12:53           ` Hitoshi Mitake
2009-07-01 15:44             ` Frederic Weisbecker
2009-07-06  5:20               ` mitake
2009-07-06  8:51                 ` Peter Zijlstra
2009-07-06 11:54                   ` Andi Kleen
2009-07-10 12:45                     ` mitake
2009-07-10 12:52                       ` Peter Zijlstra
2009-07-10 13:43                         ` Ingo Molnar
2009-07-10 13:46                           ` Frederic Weisbecker
2009-07-10 13:50                             ` Ingo Molnar
2009-07-10 13:56                               ` Peter Zijlstra
2009-07-12  7:23                         ` Hitoshi Mitake
2009-07-12 13:24                           ` Peter Zijlstra
2009-07-13  6:06                             ` Hitoshi Mitake
2009-07-13  8:51                               ` Ingo Molnar
2009-07-14  0:48                                 ` Hitoshi Mitake
2009-07-18 13:25                                   ` Ingo Molnar
2009-07-01 12:40       ` Andi Kleen
2009-07-01 13:50       ` [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat II Andi Kleen
2009-07-01  9:48     ` [PATCH][RFC] Adding information of counts processes acquired how many spinlocks to schedstat Andi Kleen

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=20090701110620.GB15958@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitake@dcl.info.waseda.ac.jp \
    /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

all inboxes | Powered by JetHome®