Question about watchdog

Ruben Safir ruben at mrbrklyn.com
Sun Jul 8 15:46:32 EDT 2018


On Mon, Jul 02, 2018 at 10:29:30AM +0200, Greg KH wrote:
> On Mon, Jul 02, 2018 at 08:58:16AM +0100, Justin Skists wrote:
> > 
> > > On 01 July 2018 at 13:44 bing zhu <zhubohong12 at gmail.com> 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. :-)
> 
> Not true, Linux can take a cpu, remove itself from it, and run a single
> process if needed, just fine.  It's a great operating system for such a
> thing.
> 
> You just have to use the apis we have for this already, it's been
> possible to do this for many years now.
> 
> As for why you would want to do this within the kernel itself, well, I
> can understand that need for some situations, and it is possible to do
> as well, just use the correct api and all is fine (no, I can't remember
> what it is at the moment, sorry...)
> 
> greg k-h
> 


What are you saying?  That is the filesystem bus sends a HW interupt on
the bus that the scheuler will ignore it and refuse to swap the
executable to handle the HW interupt?


> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013




More information about the Kernelnewbies mailing list