From: Ingo Molnar <mingo@elte.hu>
To: Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC PATCH] perf_counter: Add support for pinned and exclusive counter groups
Date: Thu, 15 Jan 2009 12:21:00 +0100 [thread overview]
Message-ID: <20090115112100.GC22850@elte.hu> (raw)
In-Reply-To: <18798.44766.734357.560006@cargo.ozlabs.ibm.com>
* Paul Mackerras <paulus@samba.org> wrote:
> Ingo Molnar writes:
>
> > (btw., the percpu allocation code seems to have bitrotten a bit - the
> > logic around perf_reserved_percpu looks wrong and somewhat complicated.)
>
> Yes, it has. I don't think it was ever fixed to apply only to hardware
> counters when software counters were added.
>
> Side question - were you intending to make the various software counters
> able to act as interrupting counters? That will mean e.g. that anything
> that increments current->maj_flt or current->min_flt (i.e.
> do_page_fault, __get_user_pages) will need to check if that causes any
> counter to overflow, which could be a bit invasive.
Yes, eventually my intention was to bring all the sw counters up to that
level, and allow system sampling via sw counter overflows. It's an
arguably powerful concept.
I first wanted to see where they all go though, and how many of them we
want, and how nuanced we want to make them.
Initially we can sample via __builtin_return_address(0) addresses, or
pt_regs(current)->rip or so. Later on we could use save_stack_trace()
perhaps, for a more vectored sample.
It would result in some rather cool kerneltop output: we could see a
profile of which functions generate pagefaults, or which places generate
context-switches, which places migrate a lot, etc.
> > Again, which restrictions users/developers are more willing to live
> > with will be shown in actual usage of these facilities.
>
> Indeed.
So my approach was always to have a good guess about what the best usage
pattern is, but also to not be rigid and ignore/exclude other usecases.
The main principle of this subsystem is to be maximally useful in
performance analysis, via modern and flexible abstractions. Pinning and
exclusivity fits into that just fine - they are mechanism to improve the
quality of the statistics.
Ingo
next prev parent reply other threads:[~2009-01-15 11:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 9:24 [RFC PATCH] perf_counter: Add support for pinned and exclusive counter groups Paul Mackerras
2009-01-14 9:57 ` Ingo Molnar
2009-01-14 10:08 ` Ingo Molnar
2009-01-15 3:34 ` Paul Mackerras
2009-01-15 11:21 ` Ingo Molnar [this message]
2009-01-15 2:23 ` Paul Mackerras
2009-01-15 11:21 ` Ingo Molnar
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=20090115112100.GC22850@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.