public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Richard J Moore <richardj_moore@uk.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	Andrew Morton <akpm@osdl.org>,
	davem@davemloft.net, Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	prasanna@in.ibm.com, suparna@in.ibm.com,
	"Theodore Ts'o" <tytso@mit.edu>
Subject: Re: RFC - Approaches to user-space probes
Date: Tue, 28 Mar 2006 11:47:57 +0200	[thread overview]
Message-ID: <200603281147.59382.ak@suse.de> (raw)
In-Reply-To: <OF74E934C4.97847922-ON8025713F.00310595-8025713F.00355BC1@uk.ibm.com>

On Tuesday 28 March 2006 11:42, Richard J Moore wrote:

> 1) ptrace is orientated to debugging a specific process tree and a
> nominated debug process. Having it operate on arbitrary process would
> require kernel extensions to achieve that but would also have a major
> impact on performance if each event were to result in a context switch to
> the debugger process.

You can attach it to any pid 

The problem is just finding new processes when they are created. And when
you trace all it will be quite inefficient.

> 
> 2) ptrace operates by privatizing memory via COW, but kprobes doesn't. The
> probes are fixed-up when a page is brought into memory by using an alias
> r/w virtual address. Using existing the ptrace mechanism across all, or
> most, processes could have a significant affect on swapfile and paging
> rate. And that has to be bad news when investigating performance and race
> conditions problems.

The problem with ptrace is also that it is quite heavyweight - you have
to take over all signals at least etc. Some lighter weight probing
mechanism for user space would be probably a good idea.

> If we want to make life easier for debugging the types of problems
> indicated above, then it's seems very reasonable to ask whether ptrace can
> be extended to use the (user) kprobes mechanism.

It's a mistery to me why people hate ioctl and like ptrace.

ptrace already is far too complex and ugly. Clean new calls would be probably
preferable. 

-Andi

  reply	other threads:[~2006-03-28  9:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-27  6:54 RFC - Approaches to user-space probes Prasanna S Panchamukhi
2006-03-27  7:37 ` Arjan van de Ven
2006-03-27 10:00   ` Prasanna S Panchamukhi
2006-03-27 20:03     ` Arjan van de Ven
2006-03-28  9:42       ` Richard J Moore
2006-03-28  9:47         ` Andi Kleen [this message]
2006-03-28 10:10           ` Richard J Moore
2006-03-28 14:54       ` Prasanna S Panchamukhi
2006-03-28 17:29         ` Arjan van de Ven
2006-03-28 20:35         ` Frank Ch. Eigler
2006-03-28 20:44           ` Andi Kleen
2006-03-31 11:55           ` Prasanna S Panchamukhi
2006-03-31 16:25             ` Frank Ch. Eigler

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=200603281147.59382.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=prasanna@in.ibm.com \
    --cc=richardj_moore@uk.ibm.com \
    --cc=suparna@in.ibm.com \
    --cc=tytso@mit.edu \
    /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