Received: by 10.192.165.148 with SMTP id m20csp651937imm; Wed, 25 Apr 2018 05:45:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/iWus+Rn7Fq71d0+9APKPR6AgPfLsR2m8eJVb/loQtpTn4ULXCLqKi5xyb5tm1ffyptrbH X-Received: by 10.99.121.129 with SMTP id u123mr15065055pgc.328.1524660305786; Wed, 25 Apr 2018 05:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524660305; cv=none; d=google.com; s=arc-20160816; b=z+MpgoubEFIVm26gXBC2rrfHeOnvZiYRPpUEJqTMNwg/Ylu2N7whou5amjhkyLTSn8 GY1dvR8rqw7OzlYVknreT1A5dqVPyEgITYQBVZYULfoLpZzTC3+aNYdm0XwypVGxBR2i yK9izQF0Xyw8pQzMETHDC9e+JdI8ZKWo1uwKjOk0bVM/TjVMpcH2ntcF1IjWzWJJZ1Ye Cb7b/Yy6t7i7RM8XqQV+5r3mN8M2DayFdrg70z9YRZxzIDpG9bcNn0/jDHntNvFkdhI/ 8UzZ6NuKgrnKE8V1qCkxNL2xYDL51F394Qsmz+sTSd07XkKC00Smz7c2bBO3uJcqDR0f 6l/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=IeCJHQ3BDY4HfksM+5CC61KsQnKvxJ3kMuE1+VMnjd0=; b=j4+nrMv71pgPmZF8hTp51/n9xYZfP8c/YQALEuuvgHfmmsMtabxug+sXmDs1gfhOi0 fqwrlwTbqK4BhNDFZ8CpTyexhN93bDSQCk/MkKVGnMpIMSDzzce/TrjZrhXXTvM4qCSt g5VK3/uBuKm0AlkNEgG4rJ+3EaVst27DpbVnkTOfVXhQ+4IsCqKE7XPjrmS1C0m2PqEK ddh0hvuLrQG/r9pRek5/4vemcjByNWq9yomSDCcjyA5euU91wKPiMdEW0pgp0dw881P+ sltveLGWMjMr1ftpIWK22k+/FEdidqFVziJAID3LM+wwXfwVdIp5FtNMem3+gFMzzLlt 53TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h62si13424654pfg.308.2018.04.25.05.44.51; Wed, 25 Apr 2018 05:45:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753046AbeDYMnp (ORCPT + 99 others); Wed, 25 Apr 2018 08:43:45 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751525AbeDYMnh (ORCPT ); Wed, 25 Apr 2018 08:43:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A73C4406C743; Wed, 25 Apr 2018 12:43:36 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 174F01C718; Wed, 25 Apr 2018 12:43:34 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w3PChY98017065; Wed, 25 Apr 2018 08:43:34 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3PChWoh017061; Wed, 25 Apr 2018 08:43:32 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Wed, 25 Apr 2018 08:43:32 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Michal Hocko cc: Richard Weinberger , 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 , linux-mtd@lists.infradead.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: vmalloc with GFP_NOFS In-Reply-To: <20180424232517.GC17484@dhcp22.suse.cz> Message-ID: References: <20180424162712.GL17484@dhcp22.suse.cz> <3732370.1623zxSvNg@blindfold> <20180424192803.GT17484@dhcp22.suse.cz> <3894056.cxOY6eVYVp@blindfold> <20180424230943.GY17484@dhcp22.suse.cz> <20180424232517.GC17484@dhcp22.suse.cz> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 25 Apr 2018 12:43:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 25 Apr 2018 12:43:36 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Apr 2018, Michal Hocko wrote: > On Tue 24-04-18 19:17:12, Mikulas Patocka wrote: > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > 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 > > > > BTW. should memalloc_nofs_save and memalloc_noio_save be merged into just > > one that prevents both I/O and FS recursion? > > Why should FS usage stop IO altogether? Because the IO may reach loop and loop may redirect it to the same filesystem that is running under memalloc_nofs_save and deadlock. > > memalloc_nofs_save allows submitting bios to I/O stack and the bios > > created under memalloc_nofs_save could be sent to the loop device and the > > loop device calls the filesystem... > > Don't those use NOIO context? What do you mean? Mikulas