public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: eranian@hpl.hp.com
Cc: akpm@osdl.org, Robert Richter <robert.richter@amd.com>,
	gregkh@suse.de, linux-kernel@vger.kernel.org,
	perfmon@napali.hpl.hp.com, Andi Kleen <andi@firstfloor.org>,
	perfmon2-devel@lists.sourceforge.net
Subject: Re: [perfmon] Re: [perfmon2] perfmon2 merge news
Date: Tue, 13 Nov 2007 13:33:55 -0500	[thread overview]
Message-ID: <4739EE13.2090006@redhat.com> (raw)
In-Reply-To: <20071113175545.GD4319@frankl.hpl.hp.com>

Stephane Eranian wrote:
> Hello,
> 
> On Tue, Nov 13, 2007 at 10:35:11AM -0500, William Cohen wrote:
>> Robert Richter wrote:
>>> On 10.11.07 21:32:39, Andi Kleen wrote:
>>>> It would be really good to extract a core perfmon and start with
>>>> that and then add stuff as it makes sense.
>>>>
>>>> e.g. core perfmon could be something simple like just support
>>>> to context switch state and initialize counters in a basic way 
>>>> and perhaps get counter numbers for RDPMC in ring3 on x86[1]
>>> Perhaps a core could provide also as much functionality so that
>>> Perfmon can be used with an *unpatched* kernel using loadable modules?
>>> One drawback with today's Perfmon is that it can not be used with a
>>> vanilla kernel. But maybe such a core is by far too complex for a
>>> first merge.
>>>
>>> -Robert
>>>
>> Hi Robert,
>>
>> In the past I suggested that it might be useful to have a version of perfmon2 
>> that only set up the perfmon on a global basis. That would allow the patches for 
>> context switches to be added as a separate step, splitting up the patch into 
>> smaller set of patches.
>>
>> Perfmon2 uses a set of system calls to control the performance monitoring 
>> hardware. This would make it difficult to use an unpatch kernel unless perfmon 
>> changed the mechanism used to control the performance monitoring hardware.
>>
> Yes, that would be a possibility but as you pointed out there are some problems:
> 
> 	- perfmon2 uses system calls. So unless you can dynamically patch the
> 	  syscall table we would have to go back to the ioctl() and driver model.
> 	  I was under the impression that people did not quite like multiplexing
> 	  syscalls such as ioctl(). I also do prefer the multi syscall approach.
> 
> 	- perfmon2 needs to install a PMU interrupt handler. On X86, this is not just
> 	  an external device interrupts. There needs to be some APIC and interrupt
> 	  gate setup. There maybe other constraints on other architectures as well.
> 	  Not sure if all functions/structures necessary for this are available to
> 	  modules.

The oprofile module can setup a handler for PMU interrupts. This is done in 
archi/x86/oprofile/nmi_int:nmi_cpu_setup().  Other modules could do the same. 
However, it bumps what ever was using the nmi/pmu off, then restores nmi/pmu 
when oprofile is shut down. Maybe the pmu/nmi resource reservation mechanism 
should be another self-contained patch.

> 	- we could not support per-thread mode with the kernel module approach due to
> 	  link to the context switch code. I do believe per-thread is a key value-add
> 	  for performance monitoring.

The per-thread monitoring is useful to a number of people and many people want 
it. The thought was how to break the large perfmon patch into set of smaller 
incremental patches. So it isn't whether to have per-thread pmu virtualization, 
but rather when/how to get it in.

-Will

  reply	other threads:[~2007-11-13 18:41 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07  0:34 [PATCH] fix up perfmon to build on -mm Greg KH
2007-11-07 10:34 ` Stephane Eranian
2007-11-07 17:07   ` Greg KH
2007-11-07 13:42 ` Stephane Eranian
2007-11-07 17:08   ` Greg KH
2007-11-07 17:33     ` Andrew Morton
2007-11-07 17:41       ` Greg KH
2007-11-07 17:50     ` Stephane Eranian
2007-11-07 17:47   ` Greg KH
2007-11-07 17:57     ` Stephane Eranian
2007-11-07 19:53       ` Greg KH
2007-11-07 20:39         ` Stephane Eranian
2007-11-08 15:27         ` Stephane Eranian
2007-11-09 20:06 ` Andrew Morton
2007-11-09 21:38   ` Greg KH
2007-11-10 20:32     ` Andi Kleen
2007-11-13 15:17       ` perfmon2 merge news Robert Richter
2007-11-13 15:35         ` [perfmon2] " William Cohen
2007-11-13 17:55           ` Stephane Eranian
2007-11-13 18:33             ` William Cohen [this message]
2007-11-13 21:13               ` [perfmon] " Stephane Eranian
2007-11-13 21:29                 ` Andi Kleen
2007-11-13 21:46                   ` Stephane Eranian
2007-11-13 21:50                     ` Andi Kleen
2007-11-13 22:22                       ` Stephane Eranian
2007-11-13 22:25                         ` Andi Kleen
2007-11-13 22:58                           ` Stephane Eranian
2007-11-14  2:07                             ` Andi Kleen
2007-11-14 13:09                               ` Stephane Eranian
2007-11-14 14:24                                 ` Andi Kleen
2007-11-14 15:44                                   ` William Cohen
2007-11-14 16:13                                     ` Stephane Eranian
2007-11-14 18:53                                     ` Philippe Elie
2007-11-14 19:15                                       ` Andi Kleen
2007-11-15  0:07                                   ` Stephane Eranian
2007-11-13 18:47             ` Philip Mucci
2007-11-13 18:59               ` Greg KH
2007-11-13 20:07                 ` Andrew Morton
2007-11-13 20:14                   ` Greg KH
2007-11-13 20:36                   ` Andi Kleen
2007-11-14  0:28                     ` Philip Mucci
2007-11-14  1:52                       ` Andi Kleen
2007-11-16  9:18                         ` Philip Mucci
2007-11-16 15:15                           ` Andi Kleen
2007-11-16 16:00                             ` Stephane Eranian
2007-11-16 16:28                               ` Andi Kleen
2007-11-16 17:13                                 ` William Cohen
2007-11-16 21:56                                   ` Stephane Eranian
2007-11-16 17:36                                 ` Stephane Eranian
2007-11-16 17:51                             ` dean gaudet
2007-11-17  0:29                               ` David Miller
2007-11-17  1:07                                 ` Greg KH
2007-11-16 20:16                             ` Philip Mucci
2007-11-17  0:15                             ` David Miller
     [not found]                             ` <1d7226b10711161713j675341b7wdb4f050c59a8be0a@mail.gmail.com>
2007-11-17  1:25                               ` Greg KH
     [not found]                                 ` <1d7226b10711161748n39b7f195q796d85282ef66134@mail.gmail.com>
2007-11-17  2:13                                   ` Greg KH
2007-11-14  7:24                   ` [perfmon] Re: [perfmon2] " Paul Mackerras
2007-11-14  7:40                     ` Andrew Morton
2007-11-14 10:38                     ` Christoph Hellwig
2007-11-14 10:43                       ` Paul Mackerras
2007-11-14 11:00                         ` Christoph Hellwig
2007-11-14 11:12                           ` David Miller
2007-11-14 11:14                             ` David Miller
2007-11-14 11:44                             ` Paul Mackerras
2007-11-13 23:49                               ` Nick Piggin
2007-11-14 11:58                                 ` David Miller
2007-11-14  0:25                                   ` Nick Piggin
2007-11-14 21:30                                     ` Paul Mackerras
2007-11-14 10:17                                       ` Nick Piggin
2007-11-14 22:56                                         ` Chuck Ebbert
2007-11-14 11:03                                           ` Nick Piggin
2007-11-14 11:52                               ` David Miller
2007-11-14 12:03                                 ` Paul Mackerras
2007-11-14 12:07                                   ` David Miller
2007-11-14  0:28                                     ` Nick Piggin
2007-11-14 21:50                                     ` Paul Mackerras
2007-11-14 23:03                                       ` David Miller
2007-11-14 23:12                                         ` Paul Mackerras
2007-11-14 23:21                                           ` David Miller
2007-11-15  1:11                                             ` Paul Mackerras
2007-11-15  1:27                                               ` David Miller
2007-11-15  2:34                                                 ` Paul Mackerras
2007-11-15  7:48                                                   ` Herbert Xu
2007-11-15  8:19                                                     ` Andi Kleen
2007-11-19 13:08                                                 ` David Miller
2007-11-19 20:53                                                   ` Stephane Eranian
2007-11-20  0:55                                                     ` David Miller
2007-11-19 21:43                                                   ` Paul Mackerras
2007-11-19 22:48                                                     ` Stephane Eranian
2007-11-20  0:53                                                       ` David Miller
2007-12-13 16:00                                                         ` Stephane Eranian
2007-12-14 19:12                                                           ` Frank Ch. Eigler
2007-12-14 21:07                                                             ` Stephane Eranian
2007-12-15 15:54                                                               ` Frank Ch. Eigler
2007-11-15  8:29                                               ` [perfmon] " Stephane Eranian
2007-11-14 13:51                               ` Stephane Eranian
2007-11-14 11:39                           ` Paul Mackerras
2007-11-14 11:52                             ` David Miller
2007-11-14 13:47                             ` Stephane Eranian
2007-11-14 12:38                           ` Andi Kleen
2007-11-14 14:13                             ` Stephane Eranian
2007-11-14 14:26                               ` Andi Kleen
2007-11-15  0:23                                 ` Paul Mackerras
2007-11-14 19:48                             ` David Miller
2007-11-15  4:20                             ` dean gaudet
2007-11-15  4:47                               ` Paul Mackerras
2007-11-15  5:14                                 ` dean gaudet
2007-11-15  8:53                               ` Stephane Eranian
2007-11-15 17:01                               ` [perfmon2] [perfmon] " Dan Terpstra
2007-11-13 21:33                 ` [perfmon] Re: [perfmon2] " Stephane Eranian
2007-11-13 21:45                   ` Greg KH
2007-11-13 22:27               ` Christoph Hellwig
2007-11-13 20:42           ` Andi Kleen
2007-11-13 18:32         ` Stephane Eranian
2007-11-13 22:29           ` Christoph Hellwig
2007-11-16 18:25           ` PMC core internal API design Mathieu Desnoyers

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=4739EE13.2090006@redhat.com \
    --to=wcohen@redhat.com \
    --cc=akpm@osdl.org \
    --cc=andi@firstfloor.org \
    --cc=eranian@hpl.hp.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perfmon2-devel@lists.sourceforge.net \
    --cc=perfmon@napali.hpl.hp.com \
    --cc=robert.richter@amd.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