> OK, this is indeed best done in the scheduler. You can > probably go for a 2-phase approach: > > 1) use a function pointer in the task struct, which > is set for each task when your module is loaded The point is that my module do not know the processes it will have to hook - they are passed from a dev file. > > 2) somewhere in the scheduler code (when a process is > selected): > > if (p->schedule_profile) > ... call the magic function pointer This has to be done on-the-fly, that is, I can not recompile the kernel - this must be done by a online-patch. > > regards, > > Rik -- Luís Henriques - Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/