This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug kprobes/10869] kretprobes waste a lot of memory on kretprobe_instances
- From: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 29 Oct 2009 17:27:32 -0000
- Subject: [Bug kprobes/10869] kretprobes waste a lot of memory on kretprobe_instances
- References: <20091029165749.10869.jistone@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jkenisto at us dot ibm dot com 2009-10-29 17:27 -------
Some historical perspective: We originally allocated all the instances for a
particular kretprobe in a block. kmallocing the instances individually solved a
problem we encountered when the kretprobe was unregistered while some instances
were still active. We have to turn loose of the kretprobe object when the user
unregisters it.
One alternative is to treat the instances as a pool separate from their
kretprobe -- in which case each instance would probably need a pointer to its
pool as well as its rp pointer. (The rp pointer is promised by the API.)
It might also be good to explore the (probably heretical) idea of allocating the
instances (GFP_ATOMIC, since we can't block) only as needed.
I also worked on a prototype where a group of kretprobes shared a common pool --
the idea being that of all the functions you're probing, only a limited set
would be active at any one time.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10869
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.