From: Frederic Weisbecker <fweisbec@gmail.com>
To: "K.Prasad" <prasad@linux.vnet.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [Patch 1/1] Introduce register_user_hbp_by_pid() and unregister_user_hbp_by_pid()
Date: Wed, 30 Dec 2009 23:28:39 +0100 [thread overview]
Message-ID: <20091230222837.GI6322@nowhere> (raw)
In-Reply-To: <20091221184631.GB24535@in.ibm.com>
On Tue, Dec 22, 2009 at 12:16:31AM +0530, K.Prasad wrote:
> On Fri, Dec 18, 2009 at 09:47:48PM +0100, Frederic Weisbecker wrote:
> > > +
> > > + do {
> > > + mutex_lock(&start->perf_event_mutex);
> > > + list_for_each_entry_safe(bp, temp_bp, &start->perf_event_list,
> > > + owner_entry) {
> > > + if (bp->attr.type != PERF_TYPE_BREAKPOINT)
> > > + continue;
> > > + unregister_hw_breakpoint(bp);
> > > + break;
> >
> > Do you really want to unregister all of them? What about those
> > that may have been registered using perf syscall?
> >
>
> Seems that I got influenced heavily by the PPC64 design (was coding
> simultaneously for it :-)...will accept a "struct perf_event_attr *" and
> use that to identify appropriate breakpoint.
:)
> > And this function needs rcu too.
> >
> > I don't see any in-kernel user for this new feature.
> > That would be required to integrate it.
> >
>
> The proposed interfaces, as obvious, are mere wrappers over existing
> (un)register_user_* interfaces, and don't do anything vastly different
> in order to demonstrate them separately.
>
> I can get a sample kernel module ready - that consumes pid and user-space
> address to track write accesses, if you prefer it.
Ok. The code looks good and useful.
But the usual philosophy in the kernel is to not add code
that is left unused upstream. And samples don't substitute a user.
I'm not sure this is a good idea to merge this.
next prev parent reply other threads:[~2009-12-30 22:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 17:20 [Patch 0/1] Enable user-space breakpoint requests using PID K.Prasad
2009-12-17 17:22 ` [Patch 1/1] Introduce register_user_hbp_by_pid() and unregister_user_hbp_by_pid() K.Prasad
2009-12-18 20:47 ` Frederic Weisbecker
2009-12-21 18:46 ` K.Prasad
2009-12-30 22:28 ` Frederic Weisbecker [this message]
2009-12-31 18:48 ` K.Prasad
2010-01-10 4:00 ` Frederic Weisbecker
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=20091230222837.GI6322@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=prasad@linux.vnet.ibm.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