From: Jason Gunthorpe <jgg@ziepe.ca>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Linux MM" <linux-mm@kvack.org>,
"DRI Development" <dri-devel@lists.freedesktop.org>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Michal Hocko" <mhocko@suse.com>,
"David Rientjes" <rientjes@google.com>,
"Christian König" <christian.koenig@amd.com>,
"Jérôme Glisse" <jglisse@redhat.com>,
"Daniel Vetter" <daniel.vetter@intel.com>
Subject: Re: [PATCH 4/4] mm, notifier: Catch sleeping/blocking for !blockable
Date: Thu, 22 Aug 2019 11:24:10 -0300 [thread overview]
Message-ID: <20190822142410.GB8339@ziepe.ca> (raw)
In-Reply-To: <CAKMK7uERsmgFqDVHMCWs=4s_3fHM0eRr7MV6A8Mdv7xVouyxJw@mail.gmail.com>
On Thu, Aug 22, 2019 at 10:42:39AM +0200, Daniel Vetter wrote:
> > RDMA has a mutex:
> >
> > ib_umem_notifier_invalidate_range_end
> > rbt_ib_umem_for_each_in_range
> > invalidate_range_start_trampoline
> > ib_umem_notifier_end_account
> > mutex_lock(&umem_odp->umem_mutex);
> >
> > I'm working to delete this path though!
> >
> > nonblocking or not follows the start, the same flag gets placed into
> > the mmu_notifier_range struct passed to end.
>
> Ok, makes sense.
>
> I guess that also means the might_sleep (I started on that) in
> invalidate_range_end also needs to be conditional? Or not bother with
> a might_sleep in invalidate_range_end since you're working on removing
> the last sleep in there?
I might suggest the same pattern as used for locked, the might_sleep
unconditionally on the start, and a 2nd might sleep after the IF in
__mmu_notifier_invalidate_range_end()
Observing that by audit all the callers already have the same locking
context for start/end
Jason
next prev parent reply other threads:[~2019-08-22 14:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 8:18 [PATCH 0/4] mmu notifier debug annotations/checks Daniel Vetter
2019-08-20 8:18 ` [PATCH 1/4] mm, notifier: Add a lockdep map for invalidate_range_start/end Daniel Vetter
2019-08-20 13:31 ` Jason Gunthorpe
2019-08-20 8:19 ` [PATCH 2/4] mm, notifier: Prime lockdep Daniel Vetter
2019-08-20 13:31 ` Jason Gunthorpe
2019-08-20 8:19 ` [PATCH 3/4] kernel.h: Add non_block_start/end() Daniel Vetter
2019-08-20 20:24 ` Daniel Vetter
2019-08-22 23:14 ` Andrew Morton
2019-08-23 8:34 ` Daniel Vetter
2019-08-23 12:12 ` Jason Gunthorpe
2019-08-23 12:22 ` Peter Zijlstra
2019-08-23 13:42 ` Daniel Vetter
2019-08-23 14:06 ` Peter Zijlstra
2019-08-23 15:15 ` Daniel Vetter
2019-08-23 8:48 ` Peter Zijlstra
2019-08-20 8:19 ` [PATCH 4/4] mm, notifier: Catch sleeping/blocking for !blockable Daniel Vetter
2019-08-20 13:34 ` Jason Gunthorpe
2019-08-20 15:18 ` Daniel Vetter
2019-08-20 15:27 ` Jason Gunthorpe
2019-08-21 9:34 ` Daniel Vetter
2019-08-21 15:41 ` Daniel Vetter
2019-08-21 16:16 ` Jason Gunthorpe
2019-08-22 8:42 ` Daniel Vetter
2019-08-22 14:24 ` Jason Gunthorpe [this message]
2019-08-22 14:27 ` Daniel Vetter
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=20190822142410.GB8339@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
/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