[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161214090502.GC25573@dhcp22.suse.cz>
Date: Wed, 14 Dec 2016 10:05:02 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Andreas Dilger <adilger@...ger.ca>
Cc: Linux MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
David Rientjes <rientjes@...gle.com>,
Mel Gorman <mgorman@...e.de>,
Johannes Weiner <hannes@...xchg.org>,
Anatoly Stepanov <astepanov@...udlinux.com>,
LKML <linux-kernel@...r.kernel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
"Michael S. Tsirkin" <mst@...hat.com>,
Theodore Ts'o <tytso@....edu>, kvm@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-security-module@...r.kernel.org,
Dave Chinner <david@...morbit.com>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers
On Tue 13-12-16 13:55:46, Andreas Dilger wrote:
> On Dec 13, 2016, at 3:14 AM, Michal Hocko <mhocko@...nel.org> wrote:
> >
> > Are there any more comments or objections to this patch? Is this a good
> > start or kv[mz]alloc has to provide a way to cover GFP_NOFS users as
> > well in the initial version.
>
> I'm in favour of this cleanup as a starting point. I definitely agree
> that this same functionality is in use in a number of places and should
> be consolidated.
>
> The vmalloc() from GFP_NOFS can be addressed separately in later patches.
> That is an issue for several filesystems, and while XFS works around this,
> it would be better to lift that out of the filesystem code into the VM.
Well, my longer term plan is to change how GFP_NOFS is used from the fs
code rather than tweak the VM layer. The current situation with the nofs
is messy and confusing. In many contexts it is used without a good
reason - just to be sure that nothing will break. I strongly believe
that we should use a scope api [1] which marks whole regions of
potentially reclaim dangerous code paths and all the allocations within
that region will inherit the nofs protection automatically. That would
solve the vmalloc(GFP_NOFS) problem as well. The route to get there is
no short or easy. I am planning to repost the scope patchset hopefully
soon with ext4 converted.
[1] http://lkml.kernel.org/r/1461671772-1269-1-git-send-email-mhocko@kernel.org
> Really, there are several of things about vmalloc() that could improve
> if we decided to move it out of the dog house and allow it to become a
> first class citizen, but that needs a larger discussion, and you can
> already do a lot of cleanup with just the introduction of kvmalloc().
>
> Since this is changing the ext4 code, you can add my:
>
> Reviewed-by: Andreas Dilger <adilger@...ger.ca>
thanks!
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists