Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

From: Steven Rostedt
Date: Wed May 15 2019 - 16:11:05 EST


On Wed, 15 May 2019 11:52:57 -0700
Sultan Alsawaf <sultan@xxxxxxxxxxxxxxx> wrote:

> On Wed, May 15, 2019 at 02:32:48PM -0400, Steven Rostedt wrote:
> > I'm confused why you did this?
>
> Oleg said that debug_locks_off() could've been called and thus prevented
> lockdep complaints about simple_lmk from appearing. To eliminate any possibility
> of that, I disabled debug_locks_off().

But I believe that when lockdep discovers an issue, the data from then
on is not reliable. Which is why we turn it off. But just commenting
out the disabling makes lockdep unreliable, and is not a proper way to
test your code.

Yes, it can then miss locking issues after one was discovered. Thus,
you are not properly testing the locking in your code.

-- Steve