Will, On Mon, Nov 13, 2006 at 06:02:19PM -0500, William Cohen wrote: > The current set of Perfmon2 patches have changes that touch core parts of > the kernel due to the per thread support (scheduler and task struct). I am > wondering if splitting perfmon set that has the basic perfmon interface > but only allows system-wide setting of the performance monitoring hardware > and per thread support patches would be a worthwhile. Would this be a > logical way to further break down the perfmon2 patches?
Yes, this is another way of splitting it up. But I am not sure you will win much. The two modes are fairly intertwined in the code. It is not like you have a functionality that is implemented by a per-thread and system-wide function. Take context switch, you would think in system-wide you do not need it. Well that is not true on all platforms. On Ia-64 we need to intervene on context switch in system-wide to toggle some machine state (outside the PMU registers). > > Having the system-wide only subset could still be useful in sampling > systems such as OProfile. It would also avoid changing the task struct > which changes kernel abi/data structures. In theory something like this > could be seperate module that the rest of the kernel could be fairly > ignorant of (with the exception of resource allocation for nmi timer). > Are you saying that perfmon is the only suubsystem that cuased changes in the task_struct lately? Perfmon cannot be made a module because it uses system calls even for system wide. A kernel modules does not dynamically add system calls nor can it bring life to an empty system call. > Have a second set of patches that add the per-thread support on top of the > systemwide only patches. There are definitely applications were this type > of support is very desirable, e.g. allowing normal people to use the > performance monitoring hardware to see what is going on within a single > thread. System-wide requires root access and can muddle the results from > different threads. > Well, it depends on the tools. Many of the tools developed on perfmon exploit the per-thread mode mostly, pfmon, Caliper. This is were we bring a lot of value-add. Perfmon does not require root access by default. It can be configured that way if needed (via a /sys interface). Thanks. -- -Stephane _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
