[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170704081007.GA14722@dhcp22.suse.cz>
Date: Tue, 4 Jul 2017 10:10:07 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Vlastimil Babka <vbabka@...e.cz>,
Andreas Dilger <adilger@...ger.ca>,
John Hubbard <jhubbard@...dia.com>,
David Miller <davem@...emloft.net>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] vmalloc: respect the GFP_NOIO and GFP_NOFS flags
On Mon 03-07-17 18:57:14, Mikulas Patocka wrote:
>
>
> On Mon, 3 Jul 2017, Michal Hocko wrote:
>
> > We can add a warning (or move it from kvmalloc) and hope that the
> > respective maintainers will fix those places properly. The reason I
> > didn't add the warning to vmalloc and kept it in kvmalloc was to catch
> > only new users rather than suddenly splat on existing ones. Note that
> > there are users with panic_on_warn enabled.
> >
> > Considering how many NOFS users we have in tree I would rather work with
> > maintainers to fix them.
>
> So - do you want this patch?
no, see below
> I still believe that the previous patch that pushes
> memalloc_noio/nofs_save into __vmalloc is better than this.
It is, but both of them are actually wrong. Why? Because that would be
just a mindless application of the scope where the scope doesn't match
the actual reclaim recursion restricted scope. Really, the right way to
go is to simply talk to the respective maintainers. Find out whether
NOFS context is really needed and if so find the scope (e.g. a lock
which would be needed in the reclaim context) and document it. This is
not a trivial work to do but a) we do not seem to have any bug reports
complaining about these call sites so there is no need to hurry and b)
this will result in a cleaner and easier to maintain code.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists