RE: changing kernel thread priority created using kernel_thread()?

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

 



Hi Pavan,

I think in Linux the kernel thread will be getting executed in the
context of the current process. I don't think these threads have its own
task struct.

Thanks
Manjunath Naik


-----Original Message-----
From: Parav Pandit [mailto:paravpandit@xxxxxxxxx] 
Sent: Monday, June 05, 2006 2:57 PM
To: Manjunath_Naik; kernelnewbies@xxxxxxxxxxxx
Subject: RE: changing kernel thread priority created using
kernel_thread()?

Hi Manjunath,

As per my understanding, nice command and
set_user_nice() are for process and not for the
threads inside the process and kernel level threads.

process are created using fork() and has huge
task_struct.
While kernel_threads are created using, kernel_thread.

I couldn't figure out which structure is for kernel
threads, as architecture specific assembly code in
arch_kernel_thread() function has in it.

Regards,
Parav Pandit


--- Manjunath_Naik <Manjunath_Naik@xxxxxxxxxx> wrote:

> 
> I think the priority of the kernel thread can be
> changed using
> "set_user_nice" function. I had found this in
> following mailing list.
> 
>
http://www.ussg.iu.edu/hypermail/linux/kernel/0510.2/1027.html
> 
> 
> set_user_nice(current, -19);
> 
> Older kernels required:
> 
> task_lock(current);
> current->nice = -19;
> task_unlock(current);
> 
> The kernel thread can set this up when it is first
> started.
> 
> 
> Thanks
> Manjunath Naik
> 
> -----Original Message-----
> From: kernelnewbies-bounce@xxxxxxxxxxxx
> [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf
> Of Parav Pandit
> Sent: Monday, June 05, 2006 1:53 AM
> To: kernelnewbies@xxxxxxxxxxxx
> Subject: changing kernel thread priority created
> using kernel_thread()?
> 
> Hi,
> 
> 1. How to change the priority of the kernel threads
> created using kernel_thread() API?
> 
> 2. What is the default priority of the threads
> created
> using kernel_thread() API?
> 
> 3. In latest 2.4 kernel and 2.6 kernel,
> do we have one-to-one mapping for user space process
> and POSIX threads to kernel_thread or we have M-to-N
> mapping?
> 
> Regards,
> Parav Pandit
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> --
> Kernelnewbies: Help each other learn about the Linux
> kernel.
> Archive:      
> http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 
> 
> 
> DISCLAIMER:
> This email (including any attachments) is intended
> for the sole use of the intended recipient/s and may
> contain material that is CONFIDENTIAL AND PRIVATE
> COMPANY INFORMATION. Any review or reliance by
> others or copying or distribution or forwarding of
> any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended
> recipient, please contact the sender by email and
> delete all copies; your cooperation in this regard
> is appreciated.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.


--
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