From: Mikael Pettersson <mikpe@csd.uu.se>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][1/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: core
Date: Tue, 22 Jun 2004 22:35:45 +0200 [thread overview]
Message-ID: <16600.38945.759248.188810@alkaid.it.uu.se> (raw)
In-Reply-To: <20040622172025.GA6074@infradead.org>
Christoph Hellwig writes:
> On Tue, Jun 22, 2004 at 04:38:06PM +0200, Mikael Pettersson wrote:
> > Swiching to open() on /proc/<pid>/<tid>/perfctr followed by ioctl()s
> > would be easy to implement. But people @ LKML are sometimes violently
> > opposed to ioctl()s, that's why the switch to syscalls happended.
>
> I don't remember the details anymore, but lots of the syscalls could
> really be read/write on special files. I'll look through the code again
> and send out draft API document.
I've thought about this, but the FS with multiple files approach
has several problems:
1. An open file descriptor no longer suffices as a user-space handle.
This is because we don't have fd = open("%d/file",dirfd) type
system calls.
2. A mini-fs under /proc/<pid>/<tid>/perfctr/ disappears when the
process disappears. Currently, a process' perfctr state lives
as long as references remains, whether via the process task_struct,
or via some open file descriptor. One use for this is in
remote-control applications, where it avoids enforcing
parent/child relationships on monitor/target processes.
Going with a mini-fs is possible (though painful to implement), but
the remote-control feature would have to be constrained to a debugger
like model. In particular, the whole notion of using an fd as a handle
to a state object with its own lifetime would have to be ditched.
/Mikael
next prev parent reply other threads:[~2004-06-22 20:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-31 22:18 Mikael Pettersson
2004-06-22 8:53 ` Andrew Morton
2004-06-22 8:59 ` Christoph Hellwig
2004-06-22 9:04 ` Andrew Morton
2004-06-22 9:12 ` Christoph Hellwig
2004-06-22 9:14 ` Andrew Morton
2004-06-22 9:18 ` Christoph Hellwig
2004-06-22 9:20 ` Andrew Morton
2004-06-22 14:38 ` Mikael Pettersson
2004-06-22 17:20 ` Christoph Hellwig
2004-06-22 20:35 ` Mikael Pettersson [this message]
2004-06-22 13:47 ` Mikael Pettersson
2004-06-22 19:18 ` Andrew Morton
2004-06-22 13:59 ` Mikael Pettersson
2004-06-22 19:22 ` Andrew Morton
[not found] <223si-461-9@gated-at.bofh.it>
[not found] ` <29Piu-4H4-27@gated-at.bofh.it>
2004-06-22 10:21 ` 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=16600.38945.759248.188810@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=akpm@osdl.org \
--cc=hch@infradead.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
all inboxes | Powered by JetHome®