How to suspend a task from a kernel module
I'm trying to write a kernel module to stop users from using more than a certain percentage of CPU.
I managed to calculate what percentage of CPU each user is using on the system but I can't find a way to suspend their processes (and later on resume then) when they have reached their threshold.
I have the "struct task_struct *p" for each process I want to suspend. I tried changing p->state or p->time_slice but it doesn't work and I can't find a clear way to stop the process from running.
Any idea ?
Thanks in advance,