Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2985122ybt; Mon, 29 Jun 2020 12:08:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDAUj/qiZ/eMsbK/4edejpG0vtZ6I0pKIm6F4MkHyYD8QnFM2TCj4ECBiEhGLZWXXl/mYG X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr15015500ejv.94.1593457710252; Mon, 29 Jun 2020 12:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593457710; cv=none; d=google.com; s=arc-20160816; b=0P1pEDm4mZqzB1APVIs4qmmVevFevAsPTbri6PgBVcbDKP3SqiKVRDU9A/E6mOztSx 50rIJsk4X9cXiLfjMu/rhj9Uv2HCD8tx6WiYlLQibx5+O8bVMGEl5tVZIqH+bZF/8dOv 8T6q8vN4dybQ8dly7afWmlLwaD3SMdGcfr4d1k0g3I78rK/9BpEpNr4KU1mUEqNKVmIO KGjZdMEIxRM+5eUst6u3dJy8DYFfm3tXtNCkVMPggIEZ+An+s3E3rpGPADdodyiTwo8V ah9bxr1dQ0l1USOMC5y3qq63Pcs9RrMYB5xdbBf73IQG7MfA3rrrRUmMg86NyoBy1OLD sWiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IEJE4pzTKwBckHnN8MJnYUJtj55RnUgeieprz/ielos=; b=dMDzEycwGEDwvpaE8iNuyXNM1FKH0GxPtPZJxBuC83uEcjjxYPOdfrgLhbmkJRKwus nGcB/QluMoSUBp/fLCxm7Q1Q+iHdTviZ6QKdMSGS91ryQTaT8b3ZwcADZZHqz0thxo5E FHn5nxAoY8y0JeYcc2hZYLtfFwvV4RIMbUomvCZGRUTsjj/1P6tFV4Imbd4ZUDNTyUdw gCPGMU84Y6R33n9oGUnztzIVlkEfEuOIsSSlV16waIC1i7OjKi8YlJdODb7ejLw090fn zMCmlK/ip/7THC2chRDJDXVxnW992yOe5gQyHuFYLyHnxkqNu1RjmPKCxSEdr7Wz9P2A 59qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=OTvKQIU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si259992edn.287.2020.06.29.12.08.07; Mon, 29 Jun 2020 12:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=OTvKQIU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729831AbgF2TID (ORCPT + 99 others); Mon, 29 Jun 2020 15:08:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730826AbgF2THn (ORCPT ); Mon, 29 Jun 2020 15:07:43 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50862C00E3FB; Mon, 29 Jun 2020 05:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IEJE4pzTKwBckHnN8MJnYUJtj55RnUgeieprz/ielos=; b=OTvKQIU8NCpuynReFPzOX7sxPG BTVSLs55stmmHraBnRi26uem12+KaQj+V1eI4nr9kOJ5204WgoR9TEDgeWykyEJEGueWoT6zz5Lyn JyMjdjzxZuirLVi32k2alVYtkO02n8ePgQVbFBstHngo7UtOTcHEWnd01Xa0KUNi7R5ILAv29WWix tUNoRbV17Am92l88NVeSasyGJGdEcZ5maoj/2ZG1Jln2bvXxkxbcWyGOMifdiAetgP2Q5beo1uiI6 qdSwFTgXdx9bahX+TOjD8VzRMT30ZHxxZY9z+GPv0FVIiW1r26VCh5KcPfDwcqQWEqgWK0thaROa6 a2mxmwPQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpsjo-00026M-RY; Mon, 29 Jun 2020 12:18:16 +0000 Date: Mon, 29 Jun 2020 13:18:16 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@redhat.com, Mikulas Patocka , Jens Axboe , NeilBrown Subject: Re: [PATCH 6/6] mm: Add memalloc_nowait Message-ID: <20200629121816.GC25523@casper.infradead.org> References: <20200625113122.7540-1-willy@infradead.org> <20200625113122.7540-7-willy@infradead.org> <20200629050851.GC1492837@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200629050851.GC1492837@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: > > @@ -886,8 +868,12 @@ static struct dm_buffer *__alloc_buffer_wait_no_callback(struct dm_bufio_client > > return NULL; > > > > if (dm_bufio_cache_size_latch != 1 && !tried_noio_alloc) { > > + unsigned noio_flag; > > + > > dm_bufio_unlock(c); > > - b = alloc_buffer(c, GFP_NOIO | __GFP_NORETRY | __GFP_NOMEMALLOC | __GFP_NOWARN); > > + noio_flag = memalloc_noio_save(); > > I've read the series twice and I'm still missing the definition of > memalloc_noio_save(). > > And also it would be nice to have a paragraph about it in > Documentation/core-api/memory-allocation.rst Documentation/core-api/gfp_mask-from-fs-io.rst:``memalloc_nofs_save``, ``memalloc_nofs_restore`` respectively ``memalloc_noio_save``, Documentation/core-api/gfp_mask-from-fs-io.rst: :functions: memalloc_noio_save memalloc_noio_restore Documentation/core-api/gfp_mask-from-fs-io.rst:allows nesting so it is safe to call ``memalloc_noio_save`` or