From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752228AbdGDIKN (ORCPT ); Tue, 4 Jul 2017 04:10:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:53501 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750830AbdGDIKM (ORCPT ); Tue, 4 Jul 2017 04:10:12 -0400 Date: Tue, 4 Jul 2017 10:10:07 +0200 From: Michal Hocko To: Mikulas Patocka Cc: Alexei Starovoitov , Daniel Borkmann , Andrew Morton , Stephen Rothwell , Vlastimil Babka , Andreas Dilger , John Hubbard , David Miller , linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org Subject: Re: [PATCH] vmalloc: respect the GFP_NOIO and GFP_NOFS flags Message-ID: <20170704081007.GA14722@dhcp22.suse.cz> References: <20170630081245.GA22917@dhcp22.suse.cz> <20170630204059.GA17255@dhcp22.suse.cz> <20170703062905.GB3217@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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