From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5445C433EF for ; Wed, 1 Jun 2022 00:34:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F0316B0072; Tue, 31 May 2022 20:34:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09F6A6B0073; Tue, 31 May 2022 20:34:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECEA96B0074; Tue, 31 May 2022 20:34:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DEE6F6B0072 for ; Tue, 31 May 2022 20:34:25 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AC8A1207D6 for ; Wed, 1 Jun 2022 00:34:25 +0000 (UTC) X-FDA: 79527795690.06.826CB06 Received: from cloud48395.mywhc.ca (cloud48395.mywhc.ca [173.209.37.211]) by imf17.hostedemail.com (Postfix) with ESMTP id 16F3340053 for ; Wed, 1 Jun 2022 00:33:49 +0000 (UTC) Received: from [45.44.224.220] (port=40386 helo=[192.168.1.179]) by cloud48395.mywhc.ca with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nwCJa-0005jM-Mx; Tue, 31 May 2022 20:34:22 -0400 Message-ID: <12a76c029e9f3cac279c025776dfb2f59331dca0.camel@olivierlanglois.net> Subject: Re: [PATCH v6 04/16] iomap: Add flags parameter to iomap_page_create() From: Olivier Langlois To: "Darrick J. Wong" , Stefan Roesch Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz, hch@infradead.org Date: Tue, 31 May 2022 20:34:20 -0400 In-Reply-To: References: <20220526173840.578265-1-shr@fb.com> <20220526173840.578265-5-shr@fb.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud48395.mywhc.ca X-AntiAbuse: Original Domain - kvack.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - olivierlanglois.net X-Get-Message-Sender-Via: cloud48395.mywhc.ca: authenticated_id: olivier@olivierlanglois.net X-Authenticated-Sender: cloud48395.mywhc.ca: olivier@olivierlanglois.net X-Source: X-Source-Args: X-Source-Dir: X-Stat-Signature: 3sgijutrgtfzrrzod9sfwe716j39iydt X-Rspam-User: Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of olivier@olivierlanglois.net designates 173.209.37.211 as permitted sender) smtp.mailfrom=olivier@olivierlanglois.net; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 16F3340053 X-HE-Tag: 1654043629-327096 X-Bogosity: Ham, tests=bogofilter, spamicity=0.033839, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 2022-05-26 at 11:25 -0700, Darrick J. Wong wrote: > On Thu, May 26, 2022 at 10:38:28AM -0700, Stefan Roesch wrote: > >=20 > > =A0static struct iomap_page * > > -iomap_page_create(struct inode *inode, struct folio *folio) > > +iomap_page_create(struct inode *inode, struct folio *folio, > > unsigned int flags) > > =A0{ > > =A0=A0=A0=A0=A0=A0=A0=A0struct iomap_page *iop =3D to_iomap_page(folio)= ; > > =A0=A0=A0=A0=A0=A0=A0=A0unsigned int nr_blocks =3D i_blocks_per_folio(i= node, folio); > > +=A0=A0=A0=A0=A0=A0=A0gfp_t gfp =3D GFP_NOFS | __GFP_NOFAIL; > > =A0 > > =A0=A0=A0=A0=A0=A0=A0=A0if (iop || nr_blocks <=3D 1) > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return iop; > > =A0 > > +=A0=A0=A0=A0=A0=A0=A0if (flags & IOMAP_NOWAIT) > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0gfp =3D GFP_NOWAIT; >=20 > Hmm.=A0 GFP_NOWAIT means we don't wait for reclaim or IO or filesystem > callbacks, and NOFAIL means we retry indefinitely.=A0 What happens in > the > NOWAIT|NOFAIL case?=A0 Does that imply that the kzalloc loops without > triggering direct reclaim until someone else frees enough memory? >=20 > --D I have a question that is a bit offtopic but since it is concerning GFP flags and this is what is discussed here maybe a participant will kindly give me some hints about this mystery that has burned me for so long... Why does out_of_memory() requires GFP_FS to kill a process? AFAIK, no filesystem-dependent operations are needed to kill a process...