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 ...
- 12-06-2010 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 1
How to suspend a task from a kernel module
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 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,
Imer.
- 12-08-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,961
Try these Google search terms - a lot of links with relevant information show up: linux kernel suspend task
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
