Results 1 to 2 of 2
Hello, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-06-2010 #1
- Join Date
- Dec 2010
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,
- 12-08-2010 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Try these Google search terms - a lot of links with relevant information show up: linux kernel suspend taskSometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!