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]

[Bug kprobes/10869] kretprobes waste a lot of memory on kretprobe_instances


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


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