reliable way to set a kernel thread priority
From: ask (ask8y_at_yahoo.com)
Date: 09/23/05
- Previous message: Markus Grabner: "USB request queuing?"
- Next in thread: Kasper Dupont: "Re: reliable way to set a kernel thread priority"
- Reply: Kasper Dupont: "Re: reliable way to set a kernel thread priority"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Sep 2005 14:25:16 -0700
I have researched for this for a while but not found a good answer for
it. Basic I create a kernel thread and I want set priority for it.
Some example I browse through is to change the current->rt_priority or
current->prio, directly. I found that is probably not righ, I saw
kernel crashes.
I look one example in kernel exmaple, function defined in sched.c
migration_thread(). This thread calls setscheduler() to set the
priority. In fact a bad idea, as setscheduler() itself calls
copy_from_user(), which expect some memory from user space.
migration_thread() does not even check the return of setscheduler() ,
so it does not really set the priority.
I cam mimic the implementation of setscheduler() but take out
copy_from_user(), it's really a pain in....
Why there is no such utility in the kernel? Point it to if you know
any. Also how migration_thread() is supposed to work in the kernel?
- Previous message: Markus Grabner: "USB request queuing?"
- Next in thread: Kasper Dupont: "Re: reliable way to set a kernel thread priority"
- Reply: Kasper Dupont: "Re: reliable way to set a kernel thread priority"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|