This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC][Patch 1/4] kprobe fast unregistration
- From: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- To: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- Cc: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, hch at infradead dot org, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Prasanna S Panchamukhi <prasanna at in dot ibm dot com>, linux-kernel <linux-kernel at vger dot kernel dot org>, SystemTAP <systemtap at sources dot redhat dot com>, Satoshi Oshima <soshima at redhat dot com>, Hideo Aoki <haoki at redhat dot com>, Yumiko Sugita <yumiko dot sugita dot yf at hitachi dot com>, "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Tue, 27 Mar 2007 11:32:33 -0700
- Subject: Re: [RFC][Patch 1/4] kprobe fast unregistration
- References: <4603E7A4.50300@hitachi.com> <20070323180527.GA13728@bambi.jf.intel.com> <46073B5D.9090505@hitachi.com> <20070326181518.GA28384@bambi.jf.intel.com> <46088E59.6030304@hitachi.com>
- Reply-to: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
On Tue, Mar 27, 2007 at 12:24:09PM +0900, Masami Hiramatsu wrote:
> Would you mean that we should integrate unregistration interface?
Yes, that is correct. Ask youself how do I detect and warn
users (who are doing the below code in their module) that
there is a faster method available (don't say they have keep
checking the Kprobe Documentation file)?
struct kprobe *p;
for_each_probe(p) {
unregister_kprobe(p);
}
Hence you should either depricate the old interface ( so users are warned
and are forced to look at the new interface) or better would be to
integrate your changes into existing unregister interface( even
if it means changing the current interface).
In the end you should aim at having just one fast way of unregistering
the probes.
You can follow what Chirstoph suggested i.e modify
the existing interface to take a NULL terminated array of probes, i.e
int __kprobes unregister_kprobes(struct kprobe **pp)
Or getrid of the current unregister_kprobe() and make it a two stage process.
struct kprobe *p;
for_each_probe(p) {
prepare_unregister_kprobe(p);
}
claim_kprobes_struct(); //Same as your commit_kprobes();
I was also interested to see if we can also support enable/disable of probes and
was interested to see if your two staged approch can be used to enable this feature.
As you have stated we can discuss this in a separate email.
-thanks,
Anil