This is the mail archive of the systemtap@sourceware.org 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: Default number of active kretprobes


On Thu, 2006-03-23 at 16:42, Jim Keniston wrote:
> By the way, regarding the problem of underestimating maxactive, we
> briefly considered the idea of having a system-wide pool of
> kretprobe_instances to draw on in case any particular kretprobe runs
> short.  But that adds a little more complexity to the implementation and
> to the user interface.  (Presumably, the pool size would be a
> configuration option.)
> 
> It shouldn't be too tough to prototype that -- probably just adjust
> get_free_rp_inst() and recycle_rp_inst().
> 
> Jim
> 

Yet another possibility is per-module pools of spare
kretprobe_instances.  E.g., for each script, SystemTap could generate
code to call (say) pool = alloc_kretprobe_spares_pool(nspares) during
module init, set each kretprobe's rp.spares_pool = pool before calling
register_kretprobe(), and call free_kretprobe_spares_pool(pool) during
module exit.

Of course, allowing pools to come and go is more complicated than having
an "eternal" global pool, but I think we could handle freeing of pools
the same way we handle unregistering of kretprobes.

I figure if I keep speculating about this, somebody will come along and
point out how we don't need kretprobe_instances at all. :-}

Jim


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