Re: kernel thread priority
From: linux-os (Dick Johnson)
Date: Fri Jul 07 2006 - 08:32:46 EST
On Fri, 7 Jul 2006, Subbu wrote:
>
> Hi,
>
> I have to run some part of my network driver code in a thread which
> should have highest priority.
>
> I am working on 2.4.20-8 redhat 9 kernel version.
>
> i am using kernel_thread function to run the current process in a
> thread.
>
> How can i set the priority level of the same to the highest .
>
> please help me in this regard. what are the functions i should use
> for this
>
>
> Thanx in advance
> subbu
>
Older kernels required something like:
task_lock(current);
current->nice = PRIORITY;
task_unlock(current);
Newer kernels use:
set_user_nice(current, PRIORITY);
>
>
> "SASKEN RATED Among THE Top 3 BEST COMPANIES TO WORK FOR IN INDIA - SURVEY 2005 conducted by the BUSINESS TODAY - Mercer - TNS India"
>
> SASKEN BUSINESS DISCLAIMER
> This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.4 on an i686 machine (5592.89 BogoMips).
New book: http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html