Received: by 10.192.165.148 with SMTP id m20csp795268imm; Wed, 25 Apr 2018 07:48:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/UTEV/cYDunVLF3oEW6jDlm4pKFnOCxALgjyhZz3tlhqqjPrzWN3KykXdMPloXHeBnfDp3 X-Received: by 10.101.76.6 with SMTP id u6mr23604999pgq.388.1524667728392; Wed, 25 Apr 2018 07:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524667728; cv=none; d=google.com; s=arc-20160816; b=NiY2Akq4OipefPsTIuWtiP01+XlQvrXYPXn2JRqnlPKkNcVWZewQtDzHEWLSOT46fl jGtgj4xpYqli3f3gEFT2nv/4oqAYq88Jdlxm+cuM48SRaqLieF3l6Y+Li5dP6amHajRU SRgeqPeLnzNxhf6fiemhlqnQ1musewW/iRDo8KRE8a/xWOt8CiiC0XEEe3/mufZtDs7P HBJPunQt47Bz9rFBmLpdY4XKKbTMNoonRuQRB0wHjpSCr/lAoeujL8IQFEbcXij+Ecah IxF988thd4DBexY7w6/nKVCA2WmARE30a3t0036lnRFg88loeukLQMZkpK4/jKDZ8nNw NGmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=QCB3e3gCdnIqxzWEQSg7Za6Rt0PFcxmeGeuVxbyGydc=; b=Z3IDpmqkJWYPD5HyC0iM1b/DSXrML1lZOy9RGhN1tkjJlwEiBRiWw7TKsZ9ainerkj wXxtX8hMY2zSWV6LCdo+IImHcJarvw6/J1NWIQbCOCv4gHaTNNulXE92lxN/jeZUAbjm lP+ytZmbjVT2AEyz2662AVPYcX9OGI5nSATopo/a08STvawa4M6biy7QG9uRtHDrLYSV mHcKOlHk9eD4I37K1D8pCnTg6mghJ72AoIz5h/pZumwD2ItLs6ULLxWBmrRLKpOa4AZA QXN9Am9fdi4kkUJtqnEnFOGlJoFjKoWAPlaXmiWz6ckQnU2lnVd06UGk2SQFZVYBSpgZ f2iQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z31-v6si16458060plb.24.2018.04.25.07.48.33; Wed, 25 Apr 2018 07:48:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754742AbeDYOqG (ORCPT + 99 others); Wed, 25 Apr 2018 10:46:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:34716 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632AbeDYOqF (ORCPT ); Wed, 25 Apr 2018 10:46:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1FCE2AEAC; Wed, 25 Apr 2018 14:46:02 +0000 (UTC) Date: Wed, 25 Apr 2018 08:45:57 -0600 From: Michal Hocko To: Mikulas Patocka 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 Message-ID: <20180425144557.GD17484@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 25-04-18 08:43:32, Mikulas Patocka wrote: > > > 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. So what is the difference with the current GFP_NOFS? > > > 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? That the loop driver should make sure it will not recurse. The scope API doesn't add anything new here. -- Michal Hocko SUSE Labs