From: Michal Hocko Subject: Re: vmalloc with GFP_NOFS Date: Tue, 24 Apr 2018 17:09:43 -0600 Message-ID: <20180424230943.GY17484@dhcp22.suse.cz> References: <20180424162712.GL17484@dhcp22.suse.cz> <3732370.1623zxSvNg@blindfold> <20180424192803.GT17484@dhcp22.suse.cz> <3894056.cxOY6eVYVp@blindfold> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: LKML , Artem Bityutskiy , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Cyrille Pitchen , Theodore Ts'o , Andreas Dilger , Steven Whitehouse , Bob Peterson , Trond Myklebust , Anna Schumaker , Adrian Hunter , Philippe Ombredanne , Kate Stewart , Mikulas Patocka , linux-mtd@lists.infradead.org, linux-ext4@vger.k To: Richard Weinberger Return-path: Content-Disposition: inline In-Reply-To: <3894056.cxOY6eVYVp@blindfold> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org On Wed 25-04-18 00:18:40, Richard Weinberger wrote: > Am Dienstag, 24. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > > Also only for debugging. > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big problem. > > > I can prepare a patch. > > > > Cool! > > > > Anyway, if UBIFS has some reclaim recursion critical sections in general > > it would be really great to have them documented and that is where the > > scope api is really handy. Just add the scope and document what is the > > recursion issue. This will help people reading the code as well. Ideally > > there shouldn't be any explicit GFP_NOFS in the code. > > So in a perfect world a filesystem calls memalloc_nofs_save/restore and > always uses GFP_KERNEL for kmalloc/vmalloc? Exactly! And in a dream world those memalloc_nofs_save act as a documentation of the reclaim recursion documentation ;) -- Michal Hocko SUSE Labs