Skip to contentSkip to conversation

2.6.17.9 perfmon2 patch for review: kernel-level interface

PATCH Chuck Ebbert 3 participants 3 messages Aug 25, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Andrew Morton
Quoted 5 lines
Quoted 4 lines

Some users have requested the ability to create a monitoring session with perfmon2 from iside the kernel using a kernel thread. Perfmon2 leverages a lot of kernel mechanisms which are not easy to use for inside the kernel: e.g. file descriptor, signals, system calls.

Quoted 8 lines
Quoted 5 lines

Again, please drop this. There are no planned intree kernel users so far, and once we add them we can architect a proper API for them. Getting rid of this should also help to collapse the tons of useless abstractions layers in the current perfmon code.

Yes, I think we either need a stronger argument for including this code, or we drop it.

This interface is for people writing kprobes who want to do performance monitoring within their probe code. There will probably never be any in-kernel users, just like there are no in-kernel users of kprobes.

Quoted 2 lines

It is especially worrisome that the exports which are added here are plain old EXPORT_SYMBOL().

kprobes exports are all GPL, so these should be too.

Signature · 1 line
Chuck
#1 lore raw

Hi,

Quoted 13 lines · Chuck Ebbert
Quoted 11 lines · Andrew Morton
Quoted 10 lines
Quoted 4 lines

Some users have requested the ability to create a monitoring session with perfmon2 from iside the kernel using a kernel thread. Perfmon2 leverages a lot of kernel mechanisms which are not easy to use for inside the kernel: e.g. file descriptor, signals, system calls.

Again, please drop this. There are no planned intree kernel users so far, and once we add them we can architect a proper API for them. Getting rid of this should also help to collapse the tons of useless abstractions layers in the current perfmon code.

Quoted 7 lines
Quoted 2 lines

Yes, I think we either need a stronger argument for including this code, or we drop it.

This interface is for people writing kprobes who want to do performance monitoring within their probe code. There will probably never be any in-kernel users, just like there are no in-kernel users of kprobes.

That is indeed the reason why I put this in. In the context of kprobes code (callback), I don't think it is possible to make some upcall to userland to interact with the perfmon2 interface. Yet, I think that combining kprobes with monitoring could be very useful. A simple example is to use kprobes to control where monitoring starts and stops, e.g., on a function boundaries.

Quoted 5 lines
Quoted 2 lines

It is especially worrisome that the exports which are added here are plain old EXPORT_SYMBOL().

kprobes exports are all GPL, so these should be too.

Yes. I am just too used to EXPORT_SYMBOL(). I will fix this in the next patch.

Signature · 1 line
-Stephane
#2 lore raw
In reply to Chuck Ebbert
Quoted 6 lines · Chuck Ebbert
Quoted 2 lines

Yes, I think we either need a stronger argument for including this code, or we drop it.

This interface is for people writing kprobes who want to do performance monitoring within their probe code. There will probably never be any in-kernel users, just like there are no in-kernel users of kprobes.

Wrong argument. There is a in-tree user of kprobes and I plan to submit a lot more. If people want to write kprobes for performance mintoring they should submit them for inclusion and we can then find a proper API for it - the current one is rather horrible anyway.