[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190816082738.GC27790@dhcp22.suse.cz>
Date: Fri, 16 Aug 2019 10:27:38 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Daniel Vetter <daniel@...ll.ch>
Cc: Jason Gunthorpe <jgg@...pe.ca>, Feng Tang <feng.tang@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
Kees Cook <keescook@...omium.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Peter Zijlstra <peterz@...radead.org>,
Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
Jann Horn <jannh@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
DRI Development <dri-devel@...ts.freedesktop.org>,
Linux MM <linux-mm@...ck.org>,
Jérôme Glisse <jglisse@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
David Rientjes <rientjes@...gle.com>,
Wei Wang <wvw@...gle.com>,
Daniel Vetter <daniel.vetter@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Christian König <christian.koenig@....com>
Subject: Re: [Intel-gfx] [PATCH 2/5] kernel.h: Add non_block_start/end()
On Thu 15-08-19 22:16:43, Daniel Vetter wrote:
> On Thu, Aug 15, 2019 at 9:35 PM Michal Hocko <mhocko@...nel.org> wrote:
[...]
> > > The last detail is I'm still unclear what a GFP flags a blockable
> > > invalidate_range_start() should use. Is GFP_KERNEL OK?
> >
> > I hope I will not make this muddy again ;)
> > invalidate_range_start in the blockable mode can use/depend on any sleepable
> > allocation allowed in the context it is called from. So in other words
> > it is no different from any other function in the kernel that calls into
> > allocator. As the API is missing gfp context then I hope it is not
> > called from any restricted contexts (except from the oom which we have
> > !blockable for).
>
> Hm, that's new to me. I thought mmu notifiers very much can be called
> from direct reclaim paths, so you have to be extremely careful with
> getting back into that one.
Correct, I should have added that notifier callbacks ideally do not
allocate any memory. They can block and even that is quite a pain to be
honest.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists