Re: Kernel Threading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

> This is regarding , changing the priority of  *threads created from
> kernel space* say for the thread that was created in kerne space
> using kernel_thread() kernel api if we have to change the priority,
>
> 1. other than changing the nice value of the thread using
> set_user_nice() can we change the real time scheduling poilicy and
> priority of the thread?

IMHO you can assign real time priority (RT prio) to the kernel 
thread(s). But... you must also remember the consequence that it will 
be scheduled more often (or even dominates) compared to the other 
processes. And that could mean a very busy system, that also could lead 
to system complete lockup if you do improper locking/unlocking. 
Perhaps, to counter this side effect, you must voluntary unschedule 
these threads for a moment....

> if so how we can we change them what will happen if highest priority
> is given to the thread.

I think by giving priority lower than 99, you will automatically give it 
real time prio. Also, choose between SCHED_FIFO or SCHED_RR.  AFAIK, 
assign it to task_struct.policy (in 2.4.x, please check by yourself on 
2.6.x).

I hope it brings ideas for you...

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux