Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1541783

Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers
Date 2016-12-14 10:20 +0100
Message-ID <sOdTc-4EN-21@gated-at.bofh.it> (permalink)
References <sM4hj-51v-1@gated-at.bofh.it> <sNSlH-8pl-5@gated-at.bofh.it> <sO2l4-5Po-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 13-12-16 13:55:46, Andreas Dilger wrote:
> On Dec 13, 2016, at 3:14 AM, Michal Hocko <mhocko@kernel.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@dilger.ca>

thanks!
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2016-12-13 11:20 +0100
  Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Andreas Dilger <adilger@dilger.ca> - 2016-12-13 22:00 +0100
    Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2016-12-14 10:20 +0100
  Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Joe Perches <joe@perches.com> - 2016-12-13 23:20 +0100
    Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2016-12-14 10:10 +0100
      Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2016-12-20 15:00 +0100
        Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Joe Perches <joe@perches.com> - 2016-12-20 18:40 +0100
          Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Andrew Morton <akpm@linux-foundation.org> - 2016-12-20 23:20 +0100
            Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Michal Hocko <mhocko@kernel.org> - 2016-12-21 09:50 +0100

csiph-web