From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
hch@infradead.org
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Prasanna S Panchamukhi <prasanna@in.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
SystemTAP <systemtap@sources.redhat.com>,
Satoshi Oshima <soshima@redhat.com>,
Hideo Aoki <haoki@redhat.com>,
Yumiko Sugita <yumiko.sugita.yf@hitachi.com>,
"Frank Ch. Eigler" <fche@redhat.com>
Subject: Re: [RFC][Patch 1/4] kprobe fast unregistration
Date: Mon, 26 Mar 2007 12:17:49 +0900 [thread overview]
Message-ID: <46073B5D.9090505@hitachi.com> (raw)
In-Reply-To: <20070323180527.GA13728@bambi.jf.intel.com>
Hi Christoph and Anil,
Thank you for your comments.
Christoph Hellwig wrote:
> Speeding up the unregistration is a very good idea, but this interface
> is rather horrible. It's almost a receipe for users to get it wrong.
Keshavamurthy, Anil S wrote:
> I agree with Christop that the interface is horrible and error prone.
OK, I agree. I had chosen a confusable name.
> However, I see the use case where people want to disable the probes quickly and
> would like to reenable them again. Looking closely at your patch,
> I think this can be acheived.
Thank you.
> Here is my suggestion.
>
>> Here is an example code.
>> --
>> struct kprobes *p;
>> for_each_probe(p) {
>> unregister_kprobe_fast(p);
> ^^^^^^^^^^^^^^^^^^^^^^
> Change this to disable_kprobe(p), which is essentially the same as
> what you have implemented. And also provide an opposite function
> to reenable_kprobe(p) which enables the disabled probe again.
I'd like to change that to prepare_to_unregister_kprobe(p) instead of
disable_kprobe(p).
I think Josh and other people want interfaces to disable/reenable all
probes at once when the sysrq is pressed.
So, IMHO, these interfaces should use a global (and per-cpu?) flag which
controls whether kprobes calls user-defined handler or not, instead of
self-modifying.
For example,
if (p && p->pre_handler && kprobe_enable) {
^^^^^^^^^^^^^
...
}
But, I think this would be another story.
I'd like to discuss this topic in other mails.
>> }
>> commit_kprobes();
> ^^^^^^^^^^^^^^
> Change this to unregister_disabled_kprobes(), which essentially
> unregisters all the disabled probes.
And also, I'd like to change it to unregister_prepared_kprobes().
What would you think about this idea?
Thanks,
>
> Thanks,
> Anil Keshavamurthy
>
--
Masami HIRAMATSU
Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2007-03-26 3:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 14:43 Masami Hiramatsu
2007-03-23 14:45 ` [RFC][Patch 2/4] kretprobe fast unregisteration Masami Hiramatsu
2007-03-23 14:46 ` [RFC][Patch 3/4] jprobe " Masami Hiramatsu
2007-03-23 14:47 ` [RFC][Patch 4/4] kprobes fast unregisteration documentation Masami Hiramatsu
2007-03-23 17:23 ` [RFC][Patch 1/4] kprobe fast unregistration Christoph Hellwig
[not found] ` <20070323180527.GA13728@bambi.jf.intel.com>
2007-03-23 18:12 ` Stone, Joshua I
2007-03-23 18:22 ` Frank Ch. Eigler
[not found] ` <20070323190127.GA13974@bambi.jf.intel.com>
2007-03-26 2:29 ` Frank Ch. Eigler
2007-03-31 13:01 ` Christoph Hellwig
2007-03-31 13:06 ` Christoph Hellwig
2007-03-26 3:17 ` Masami Hiramatsu [this message]
[not found] ` <20070326181518.GA28384@bambi.jf.intel.com>
2007-03-27 3:24 ` Masami Hiramatsu
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=46073B5D.9090505@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=fche@redhat.com \
--cc=haoki@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prasanna@in.ibm.com \
--cc=soshima@redhat.com \
--cc=systemtap@sources.redhat.com \
--cc=yumiko.sugita.yf@hitachi.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
Powered by JetHome