This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][Patch 1/4] kprobe fast unregistration

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) {

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) {
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]