mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@hpl.hp.com>
To: Christoph Hellwig <hch@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, ak@muc.de,
	benh@kernel.crashing.org, paulus@samba.org, tony.luck@intel.comf
Cc: Stephane Eranian <eranian@hpl.hp.com>
Subject: Re: + perfmon2-reserve-system-calls.patch added to -mm tree
Date: Wed, 16 Nov 2005 02:24:31 -0800	[thread overview]
Message-ID: <20051116102431.GB26411@frankl.hpl.hp.com> (raw)
In-Reply-To: <20051115090612.GA22160@infradead.org>

Christoph,

On Tue, Nov 15, 2005 at 09:06:12AM +0000, Christoph Hellwig wrote:
> On Tue, Nov 15, 2005 at 12:50:26AM +0100, Arnd Bergmann wrote:
> > > --- 25/include/asm-powerpc/unistd.h~perfmon2-reserve-system-calls???????Mon Nov 14 15:27:32 2005
> > > +++ 25-akpm/include/asm-powerpc/unistd.h????????Mon Nov 14 15:27:32 2005
> > > @@ -296,8 +296,20 @@
> > > ?#define __NR_inotify_init??????275
> > > ?#define __NR_inotify_add_watch?276
> > > ?#define __NR_inotify_rm_watch??277
> > > +#define __NR_pfm_create_context????????278
> > > +#define __NR_pfm_write_pmcs????279
> > > +#define __NR_pfm_write_pmds????280
> > > +#define __NR_pfm_read_pmds?????281
> > > +#define __NR_pfm_load_context??282
> > > +#define __NR_pfm_start?????????283
> > > +#define __NR_pfm_stop??????????284
> > > +#define __NR_pfm_restart???????285
> > > +#define __NR_pfm_create_evtsets????????286
> > > +#define __NR_pfm_getinfo_evtsets 287
> > > +#define __NR_pfm_delete_evtsets 288
> > > +#define __NR_pfm_unload_context????????289
> > > ?
> > > -#define __NR_syscalls??????????278
> > > +#define __NR_syscalls??????????290
> 
> 
> anyway, this is an awfull lot of syscalls numbers for what essentially
> is a driver not core kernel functionality.  I think we should do an API
> review first.

I have cut the number of system calls as much as I could. Initially
this started out as a single multiplexing system call. Given the feedback
I received, I switched it over to multiple system calls. In retrospect,
I think this is better than the initial design.

As for your driver question, it is true that if we were only interested in
accessing the performance counters on a system-wide basis, like OProfile,
we could have implemented a device driver.

However we want both the ability to measure on a system-wide basis, i.e.,
across all kernel threads running on a processor, but also on a per kernel thread
basis. Both modes are important. Certain measurements do need to be applied
to a single thread, e.g., counting the number of retired instructions for /bin/ls.

The per-thread mode implies that, on context switch, the counters be saved
and restored like the rest of the machine state. I don't believe it is allowed
for a device driver to access to the context switch code.

Furthermore we want to have the monitoring interface be builtin to make it easier
for tools developers. A system call interface also gives us more flexibility
as to how the interface looks like, i.e., number and types of arguments.

Fro all those reasons, we felt that the syscall approach was the best.


> and why didn't this patch get sent to lkml for review?

For the last few months, I have been posting announces on lkml, perfctr-devel
and also linux-ia64-kernel about the new releases of the multi-platform perfmon
code base to sollicate feedback. I don't claim to know all the kernel internal
semantics and interfaces nor each hardware platofrm intricacies. Thus I welcome
any comments, complaints especially if they are constructive and poinpoint precise
problems in the code. This way I think we all make forward progress.

I will be releasing a new version of the patch this week. I would certainly welcome
your comments.

-- 
-Stephane

  reply	other threads:[~2005-11-16 10:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200511142329.jAENTfmS004600@shell0.pdx.osdl.net>
2005-11-14 23:50 ` Arnd Bergmann
2005-11-15  0:04   ` Paul Mackerras
2005-11-15  0:09     ` Stephane Eranian
2005-11-15  1:12   ` Andrew Morton
2005-11-15  8:00     ` Stephane Eranian
2005-11-15  8:08       ` Arjan van de Ven
2005-11-15 13:40         ` Andi Kleen
2005-11-15  9:06   ` Christoph Hellwig
2005-11-16 10:24     ` Stephane Eranian [this message]
2005-11-15 15:28 Luck, Tony
2005-11-15 15:49 ` Stephane Eranian
2005-11-15 16:58 Luck, Tony

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=20051116102431.GB26411@frankl.hpl.hp.com \
    --to=eranian@hpl.hp.com \
    --cc=ak@muc.de \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=tony.luck@intel.comf \
    /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®