linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: levon@movementarian.org
Cc: jcdutton@users.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: kernel api for application profiling
Date: Mon, 14 Oct 2002 00:17:23 +0200 (MET DST)	[thread overview]
Message-ID: <200210132217.AAA07121@harpo.it.uu.se> (raw)

On Sun, 13 Oct 2002 16:56:01 +0100, John Levon wrote:
>On Sun, Oct 13, 2002 at 03:28:44PM +0200, Mikael Pettersson wrote:
>
>> And before people ask me: perfctr is not yet in official kernels,
>> I'm working on a cleaned up version for 2.5 submission RSN,
>
>This is going to clash head-on with oprofile. However, the two systems
>are both useful in their own rights: oprofile isn't useful for
>interstitial timings as described above, whereas perfctr isn't really
>designed for system profiling.
>
>So I suspect the simplest solution would be to make the config options
>for them exclusive. Comments ?

I've thought about this problem before, and I think there is
a simple & less drastic solution to it.

The HW resources in question are the local APIC LVTPC entry
and the performance counter MSRs. Agreed?

The HW is either free or owned in full by a single client
(the NMI watchdog, oprofile, perfctr, etc). Splitting the
HW resources gets too weird and doesn't actually work.
(Consider the P6s asymmetric EVNTSEL Enable flag for instance.)

A client needs to reserve the HW before it is allowed to touch it.
Normally, a client would release the HW automatically when it no
longer needs it. perfctr already works that way, and I imagine
oprofile could do the same.

Ignoring the NMI watchdog, the resource manager becomes trivial.

The NMI watchdog is a problem. This is a client which normally
doesn't release the HW; however, it should release it if some
other specialised client (like oprofile or perfctr) needs it.
Furthermore, when that client is done, the NMI watchdog should
ideally be activated again.

The NMI watchdog can either be special-cased so that the resource
manager knows that it is a low-priority default owner of the HW,
or we can try to encode this in the interface to the manager, using
callbacks like "are you willing to release the HW?" and results
like "yes, but please call this FUNC when you're done with the HW".

/Mikael

             reply	other threads:[~2002-10-13 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-13 22:17 Mikael Pettersson [this message]
2002-10-13 22:26 ` kernel api for application profiling John Levon
2002-10-14  2:45   ` James Courtier-Dutton
2002-10-14 17:29     ` John Levon
  -- strict thread matches above, loose matches on Subject: below --
2002-10-13 13:28 Mikael Pettersson
2002-10-13 15:56 ` John Levon
2002-10-13 11:08 James Courtier-Dutton

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=200210132217.AAA07121@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=jcdutton@users.sourceforge.net \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).