On Thu, 18 Jan 2018, Peter Zijlstra wrote:

> On Thu, Jan 18, 2018 at 10:02:25AM +0100, Thomas Gleixner wrote:
> > > >   2) We can do a cond_resched() if not in atomic context and interrupts 
> > > > are
> > > >      enabled.
> > > 
> > > I did try this before I went with touching softlockup watchdog approach. 
> > > The
> > > problem is in_atomic() can't tell if it is in atomic context on 
> > > non-preempt
> > > kernel. For preempt kernel, it is easy.
> > 
> > Peter, can we do anything about that?
> 
> Not really :/ Take for instance a spinlock on !PREEMPT, only the lock
> variable is touched, preempt_count isn't. So we cannot know.

Fair enough.

Reply via email to