Re: [Intel-gfx] [PATCH 2/5] kernel.h: Add non_block_start/end()

From: Daniel Vetter
Date: Thu Aug 15 2019 - 16:49:45 EST

On Thu, Aug 15, 2019 at 10:27 PM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
> On Thu, Aug 15, 2019 at 10:16:43PM +0200, Daniel Vetter wrote:
> > So if someone can explain to me how that works with lockdep I can of
> > course implement it. But afaics that doesn't exist (I tried to explain
> > that somewhere else already), and I'm no really looking forward to
> > hacking also on lockdep for this little series.
> Hmm, kind of looks like it is done by calling preempt_disable()

Yup. That was v1, then came the suggestion that disabling preemption
is maybe not the best thing (the oom reaper could still run for a long
time comparatively, if it's cleaning out gigabytes of process memory
or what not, hence this dedicated debug infrastructure).

> Probably the debug option is CONFIG_DEBUG_PREEMPT, not lockdep?

Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 -