Received: by 10.192.165.148 with SMTP id m20csp941353imm; Wed, 25 Apr 2018 09:59:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx49F9GSSwSOocjA7hXQJ7zT0MdMktGV3gSGUXhfTeRFVYi7Eh6idB1Qq/j4x2qKYuAoGEto2 X-Received: by 10.99.153.17 with SMTP id d17mr23083955pge.106.1524675581648; Wed, 25 Apr 2018 09:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524675581; cv=none; d=google.com; s=arc-20160816; b=jIirJ596Z/15bS7sGjfqVTvBLn9T0tx3XahEDDn5Tk1p7T1XnR7R1lzDkcrchqd3Oq GVI68VNYMRUFHQyGDmBws0QGmPn3C/5IT6MjOfslkS+wH9y+NPoLstMFrL59E6lpsN9h Ci8Q+h2lwlSu12ynjPbU2AGlcyl7Oi4IZl7d01OT0SJl8L1TX3YOY3MzTDU0xLp1yuih mBRKvWP/MFnmtzPbJJalmmSv5s5oI50jRz8OQPXB5q/HJ3/sOXfjUNiMN4Ek/htXY4C7 ubszOuuyc0I3SwCC9x4V+xO7oLrQ+zsl0i+B7mwykhsSye9WkenAVWktbdlCvQ377YlP n58g== 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=SZQ7AJlfAaw8lmq7BPZrXRujPZMa0W9RpgZm1O0VP44=; b=HoimEuGhRlmmXDUjr39mm3e4wxe2j4qpnhT2LFQA47z/24oQBgNon0hGcQg4ID9unb K2UKEVmqR5rfIIDmMm/vNr4OTOb4nYqSHdX9Cpo19kIvj/F8U4UNBOeWx6EdM2OMYCUZ ofsZE5Z9erpfNtjbsXbSMM+FntlvPxOGdcLZoCTyhlGrYYG5mf3Qh9cmm4pbaofk4Vij ZevwltNH7KHJckzMrkjazl6lXVFpMyF2kP84eLOtAt75X7LBkVVCxT/rFs2qDVXtM6GZ xH0PaBmOAVC2h2JNevXRjnaZcllFGGpnhwMKCFM1pq6NhA4rU2mVjjR7TbnyWpzFc6Os wfBA== 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 p10si4761878pfn.65.2018.04.25.09.59.26; Wed, 25 Apr 2018 09:59: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755276AbeDYQ5F (ORCPT + 99 others); Wed, 25 Apr 2018 12:57:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:56835 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552AbeDYQ5C (ORCPT ); Wed, 25 Apr 2018 12:57:02 -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 ED8E2AD7C; Wed, 25 Apr 2018 16:56:59 +0000 (UTC) Date: Wed, 25 Apr 2018 10:56:55 -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: <20180425165655.GK17484@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> <20180425144557.GD17484@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 11:25:09, Mikulas Patocka wrote: > > > On Wed, 25 Apr 2018, Michal Hocko wrote: > > > 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: > > > > > > > > > > > > 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? > > My point is that filesystems should use GFP_NOIO too. If > alloc_pages(GFP_NOFS) issues some random I/O to some block device, the I/O > may be end up being redirected (via block loop device) to the filesystem > that is calling alloc_pages(GFP_NOFS). Talk to FS people, but I believe there is a good reason to distinguish the two. -- Michal Hocko SUSE Labs