linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>, Daniel Vetter <daniel@ffwll.ch>,
	Matthew Wilcox <willy@infradead.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux MM <linux-mm@kvack.org>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Dave Chinner <dchinner@redhat.com>, Leo Liu <Leo.Liu@amd.com>
Subject: Re: [PATCH] drm/ttm: stop warning on TT shrinker failure
Date: Tue, 23 Mar 2021 13:00:29 +0100	[thread overview]
Message-ID: <YFnYXdQlRnq1Vn8g@phenom.ffwll.local> (raw)
In-Reply-To: <d1d7170b-7566-32c3-9883-49e5573e7339@gmail.com>

On Tue, Mar 23, 2021 at 12:51:13PM +0100, Christian König wrote:
> 
> 
> Am 23.03.21 um 12:46 schrieb Michal Hocko:
> > On Tue 23-03-21 12:28:20, Daniel Vetter wrote:
> > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote:
> > [...]
> > > > > > fs_reclaim_acquire is there to make sure lockdep understands that this
> > > > > > is a shrinker and that it checks all the dependencies for us like if
> > > > > > we'd be in real reclaim. There is some drop caches interfaces in proc
> > > > > > iirc, but those drop everything, and they don't have the fs_reclaim
> > > > > > annotations to teach lockdep about what we're doing.
> > > > ... I really do not follow this. You shouldn't really care whether this
> > > > is a reclaim interface or not. Or maybe I just do not understand this...
> > > We're heavily relying on lockdep and fs_reclaim to make sure we get it all
> > > right. So any drop caches interface that isn't wrapped in fs_reclaim
> > > context is kinda useless for testing. Plus ideally we want to only hit our
> > > own paths, and not trash every other cache in the system. Speed matters in
> > > CI.
> > But what is special about this path to hack around and make it pretend
> > it is part of the fs reclaim path?
> 
> That's just to teach lockdep that there is a dependency.
> 
> In other words we pretend in the debugfs file that it is part of the fs
> reclaim path to check for the case when it really becomes part of the fs
> reclaim path.

Yeah this is only for testing. There's two ways to test your shrinker:

- drive system agains the OOM wall, deal with lots of unrelated hangs and
  issues. Aside from this takes postively forever, which is not good if
  you want CI turn-around time measured in "coffee breaks" as time unit.

- have a debugfs file which reconstructs the calling context of direct
  reclaim sufficiently for lockdep to do its thing, and then test just
  your shrinker in isolation, without crashing your CI machines or even
  hurting it much.

Only one of these options is actually practical.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


  reply	other threads:[~2021-03-23 12:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210319140857.2262-1-christian.koenig@amd.com>
     [not found] ` <YFTk1GSaUDI3wcWt@phenom.ffwll.local>
     [not found]   ` <2831bfcc-140e-dade-1f50-a6431e495e9d@gmail.com>
     [not found]     ` <YFT2LSR97rkkPyEP@phenom.ffwll.local>
     [not found]       ` <1ae415c4-8e49-5183-b44d-bc92088657d5@gmail.com>
     [not found]         ` <CAKMK7uEDhuvSwJj5CX8vHgLb+5zm=rdJPmXwb-VQWdrW6GwQZw@mail.gmail.com>
     [not found]           ` <e6e9df3e-cd2b-d80f-205d-6ca1865819b2@gmail.com>
2021-03-22 13:49             ` [PATCH] drm/ttm: stop warning on TT shrinker failure Daniel Vetter
2021-03-22 14:05               ` Matthew Wilcox
2021-03-22 14:22                 ` Daniel Vetter
2021-03-22 15:57                 ` Michal Hocko
2021-03-22 17:02                   ` Daniel Vetter
2021-03-22 19:34                     ` Christian König
2021-03-23  7:38                       ` Michal Hocko
2021-03-23 11:28                         ` Daniel Vetter
2021-03-23 11:46                           ` Michal Hocko
2021-03-23 11:51                             ` Christian König
2021-03-23 12:00                               ` Daniel Vetter [this message]
2021-03-23 12:05                               ` Michal Hocko
2021-03-23 11:48                           ` Christian König
2021-03-23 12:04                             ` Michal Hocko
2021-03-23 12:21                               ` Christian König
2021-03-23 12:37                                 ` Michal Hocko
2021-03-23 13:06                                   ` Christian König
2021-03-23 13:41                                     ` Michal Hocko
2021-03-23 13:56                                       ` Christian König
2021-03-23 15:13                                         ` Michal Hocko
2021-03-23 15:45                                           ` Christian König
2021-03-24 10:19                                             ` Thomas Hellström (Intel)
2021-03-24 11:55                                               ` Daniel Vetter
2021-03-24 12:00                                                 ` Christian König
2021-03-24 12:01                                                   ` Daniel Vetter
2021-03-24 12:07                                                     ` Christian König
2021-03-24 19:20                                                       ` Daniel Vetter
2021-03-23 13:15                               ` Daniel Vetter
2021-03-23 13:48                                 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFnYXdQlRnq1Vn8g@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Leo.Liu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dchinner@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).