From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [RFC PATCH] mm: introduce kv[mz]alloc helpers Date: Wed, 14 Dec 2016 10:05:02 +0100 Message-ID: <20161214090502.GC25573@dhcp22.suse.cz> References: <20161208103300.23217-1-mhocko@kernel.org> <20161213101451.GB10492@dhcp22.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Andreas Dilger Cc: Linux MM , Andrew Morton , Vlastimil Babka , David Rientjes , Mel Gorman , Johannes Weiner , Anatoly Stepanov , LKML , Paolo Bonzini , Mike Snitzer , dm-devel@redhat.com, "Michael S. Tsirkin" , Theodore Ts'o , kvm@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, Dave Chinner , Al Viro List-Id: linux-f2fs-devel.lists.sourceforge.net On Tue 13-12-16 13:55:46, Andreas Dilger wrote: > On Dec 13, 2016, at 3:14 AM, Michal Hocko 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 thanks! -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org