Received: by 10.192.165.148 with SMTP id m20csp19589imm; Tue, 24 Apr 2018 16:18:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx48n7cSiiJ6wpLDmNBGkONsehY20t6JY3hlsryrrECqV9JpRsXD4mISc1DuTYyzC4pGV7bgg X-Received: by 10.98.61.201 with SMTP id x70mr25228876pfj.85.1524611921656; Tue, 24 Apr 2018 16:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524611921; cv=none; d=google.com; s=arc-20160816; b=bPQm7K3q0uVPEOPH/ypzd5bkgDv8BtlZPQUawAoFB0Ly3HmJU4s/zz6SyOjXhK2UL2 hg4zvjSs/DK6JyshF8oiHufw2sWqrjoAO9WKaFuT58yuSUlESsPBYOxFy0oM4FicvKYb qF5pPBsyOkEucN0UrMAasUdoiwKGsOsNWgYnxzPJW08r5XJK1VDZpGrAmqAH96Ni8v0T AaUxSRka55yQwqsKg1I/k9i83F3ZL6tHlVFLD0czb1KZHSbwlXvzyiiQvMOrwhMBDGT5 qkUHjihI2eXPy0vXj+f/SyHQhXzXWz0dOXB8G9T+kBJNe3oNm2mew6ZVqRZyUnqn4leT 6U5A== 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=JLyPBDSY8EnZfyXzuFLzWbXXDTtHu5Qc3j+A7ewd6hg=; b=ataUuWIhzvuPodNdJd3KeRhyHibbi+BT0Nm5jhME9YTceJdn9Xw4zs/oy5x6jrNlrJ /tud2aLHhV/w+po3ueHAe5RK0w/bidyFQPutb6HTkMSIGeqhocdw8Uy66Hael71Irguv XkOqDYM3tWlla2h538tdFF2PtmFHaqonYyq2YFecDaK1aMCZVcny/FXKWtLAgVv49l5m KiHSM0psvmV+ro9krE7pE9DGMyO6163ZtbondrOcNGiCw1yziwfRvMGfWTxPB7lzN/4e t89gxNjo65n1dKi6z5NqvjqjGrYwqgYT0jBmctzq3t/2gZOXYWCfnrtNid9fgxxn92P6 NwvA== 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 1-v6si14460823plp.532.2018.04.24.16.18.26; Tue, 24 Apr 2018 16:18:41 -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 S1751247AbeDXXRT (ORCPT + 99 others); Tue, 24 Apr 2018 19:17:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39948 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750791AbeDXXRR (ORCPT ); Tue, 24 Apr 2018 19:17:17 -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 A10254270948; Tue, 24 Apr 2018 23:17:16 +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 1CD011C705; Tue, 24 Apr 2018 23:17:14 +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 w3ONHEF2004882; Tue, 24 Apr 2018 19:17:14 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w3ONHCnk004877; Tue, 24 Apr 2018 19:17:12 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 24 Apr 2018 19:17:12 -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: <20180424230943.GY17484@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> 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.7]); Tue, 24 Apr 2018 23:17:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 24 Apr 2018 23:17:16 +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 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? 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... Mikulas