Re: Question about watchdog

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

 



> On 01 July 2018 at 13:44 bing zhu <zhubohong12@xxxxxxxxx> wrote:
> 
> 
> Dear Sir/Ma'am
> Thank you for your time ,i'm a student new to linux kernel.at present ,i'd
> like to create a kernel thread
> say use kthread_create func ,my question is :how can i make this thread to
> run on a cpu and never get switched or scheduled , there is a
> while(1).....structure in that thread i need it to do work . at present i
> comes with errors like "NMI watchdog: BUG: soft lockup - CPU#0 stuck for
> 23s! [test thread :1881]",i understand there is a watchdog but is there
> anyway i can feed the dog myself and let my thread have cpu as much as i
> want ?

Yowsers! Why would you want to do that? The whole idea of a watchdog is
to prevent threads hogging the CPU for a long time. Linux is a multi-user,
multi-process, pre-emptive operating system. It needs to share. :-)

If you really need a thread to hog the processor, indefinitely, then you're
probably using the wrong OS. Use the correct tool for the job. Or explore
"cpusets". Or maybe rebuild the kernel with soft watchdog turned off.


Justin.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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