[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 17/29] lockup_detector: Get rid of the thread teardown/setup dance
On Fri, 1 Sep 2017, Don Zickus wrote:
> On Thu, Aug 31, 2017 at 09:16:15AM +0200, Thomas Gleixner wrote:
> > The lockup detector reconfiguration tears down all watchdog threads when
> > the watchdog is disabled and sets them up again when its enabled.
> >
> > That's a pointless exercise. The watchdog threads are not consuming an
> > insane amount of resources, so it's enough to set them up at init time and
> > keep them in parked position when the watchdog is disabled and unpark them
> > when it is reenabled. The smpboot thread infrastructure takes care of
> > keeping the force parked threads in place even across cpu hotplug.
> The original reasoning for implementing this complexity was we were worried
> about catching kthread_[un]park errors. It was thought in the rare case if
> it failed, we would hang. Perhaps we misunderstood the kthread_[un]park
> code.

park is waiting for the thread to reach park position. So if this fails,
then the thread which invoked the parking will be stuck forever.

the unpark is async, i.e. it just kicks the thread out of park position and
let it run.

So you cannot catch anything with your open coding as it just uses the same
mechanisms as the smpboot infrastructure does.



 \ /
  Last update: 2017-09-01 21:46    [W:0.029 / U:1.148 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site