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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DF9BC433F5 for ; Wed, 23 Mar 2022 06:43:04 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-70-OqEgAEUpNtubHxLfQOaK6Q-1; Wed, 23 Mar 2022 02:42:59 -0400 X-MC-Unique: OqEgAEUpNtubHxLfQOaK6Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D2D883395E; Wed, 23 Mar 2022 06:42:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 387BA4B8D43; Wed, 23 Mar 2022 06:42:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AC4801940340; Wed, 23 Mar 2022 06:42:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6DEC21949762 for ; Wed, 23 Mar 2022 06:42:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2D37B54DD9A; Wed, 23 Mar 2022 06:42:55 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 294284C36D9 for ; Wed, 23 Mar 2022 06:42:55 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 109BA801E67 for ; Wed, 23 Mar 2022 06:42:55 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-184-qGXn_gQqNsWCrrZqP1FL5Q-1; Wed, 23 Mar 2022 02:42:53 -0400 X-MC-Unique: qGXn_gQqNsWCrrZqP1FL5Q-1 Received: by verein.lst.de (Postfix, from userid 2407) id 8DA2C68AFE; Wed, 23 Mar 2022 07:42:48 +0100 (CET) Date: Wed, 23 Mar 2022 07:42:48 +0100 From: Christoph Hellwig To: Ryusuke Konishi Message-ID: <20220323064248.GA24874@lst.de> References: <20220124091107.642561-1-hch@lst.de> <20220124091107.642561-2-hch@lst.de> <20220322211915.GA2413063@roeck-us.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Subject: Re: [dm-devel] [PATCH 01/19] fs: remove mpage_alloc X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Konstantin Komarov , linux-nfs@vger.kernel.org, linux-nilfs , Andrew Morton , Mike Snitzer , Philipp Reisner , Pavel Begunkov , linux-block@vger.kernel.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= , device-mapper development , "Md . Haris Iqbal" , linux-fsdevel@vger.kernel.org, xen-devel@lists.xenproject.org, Lars Ellenberg , ntfs3@lists.linux.dev, Jack Wang , Christoph Hellwig , Guenter Roeck , drbd-dev@lists.linbit.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Mar 23, 2022 at 06:38:22AM +0900, Ryusuke Konishi wrote: > This looks because the mask of GFP_KERNEL is removed along with > the removal of mpage_alloc(). > > The default value of the gfp flag is set to GFP_HIGHUSER_MOVABLE by > inode_init_always(). > So, __GFP_HIGHMEM hits the gfp warning at bio_alloc() that > do_mpage_readpage() calls. Yeah. Let's try this to match the iomap code: diff --git a/fs/mpage.c b/fs/mpage.c index 9ed1e58e8d70b..d465883edf719 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -148,13 +148,11 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) int op = REQ_OP_READ; unsigned nblocks; unsigned relative_block; - gfp_t gfp; + gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); if (args->is_readahead) { op |= REQ_RAHEAD; - gfp = readahead_gfp_mask(page->mapping); - } else { - gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); + gfp |= __GFP_NORETRY | __GFP_NOWARN; } if (page_has_buffers(page)) -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6786FC433F5 for ; Wed, 23 Mar 2022 06:42:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237424AbiCWGoW (ORCPT ); Wed, 23 Mar 2022 02:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbiCWGoV (ORCPT ); Wed, 23 Mar 2022 02:44:21 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3DA370044; Tue, 22 Mar 2022 23:42:52 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 8DA2C68AFE; Wed, 23 Mar 2022 07:42:48 +0100 (CET) Date: Wed, 23 Mar 2022 07:42:48 +0100 From: Christoph Hellwig To: Ryusuke Konishi Cc: Christoph Hellwig , Guenter Roeck , Jens Axboe , linux-block@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nilfs , Mike Snitzer , Philipp Reisner , Konstantin Komarov , Roger Pau =?iso-8859-1?Q?Monn=E9?= , device-mapper development , "Md . Haris Iqbal" , Lars Ellenberg , linux-fsdevel@vger.kernel.org, xen-devel@lists.xenproject.org, Andrew Morton , ntfs3@lists.linux.dev, Jack Wang , Pavel Begunkov , drbd-dev@lists.linbit.com Subject: Re: [dm-devel] [PATCH 01/19] fs: remove mpage_alloc Message-ID: <20220323064248.GA24874@lst.de> References: <20220124091107.642561-1-hch@lst.de> <20220124091107.642561-2-hch@lst.de> <20220322211915.GA2413063@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Mar 23, 2022 at 06:38:22AM +0900, Ryusuke Konishi wrote: > This looks because the mask of GFP_KERNEL is removed along with > the removal of mpage_alloc(). > > The default value of the gfp flag is set to GFP_HIGHUSER_MOVABLE by > inode_init_always(). > So, __GFP_HIGHMEM hits the gfp warning at bio_alloc() that > do_mpage_readpage() calls. Yeah. Let's try this to match the iomap code: diff --git a/fs/mpage.c b/fs/mpage.c index 9ed1e58e8d70b..d465883edf719 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -148,13 +148,11 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) int op = REQ_OP_READ; unsigned nblocks; unsigned relative_block; - gfp_t gfp; + gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); if (args->is_readahead) { op |= REQ_RAHEAD; - gfp = readahead_gfp_mask(page->mapping); - } else { - gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); + gfp |= __GFP_NORETRY | __GFP_NOWARN; } if (page_has_buffers(page)) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [dm-devel] [PATCH 01/19] fs: remove mpage_alloc Date: Wed, 23 Mar 2022 07:42:48 +0100 Message-ID: <20220323064248.GA24874@lst.de> References: <20220124091107.642561-1-hch@lst.de> <20220124091107.642561-2-hch@lst.de> <20220322211915.GA2413063@roeck-us.net> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ryusuke Konishi Cc: Christoph Hellwig , Guenter Roeck , Jens Axboe , linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nilfs , Mike Snitzer , Philipp Reisner , Konstantin Komarov , Roger Pau =?iso-8859-1?Q?Monn=E9?= , device-mapper development , "Md . Haris Iqbal" , Lars Ellenberg , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org, Andrew Morton , ntfs3-cunTk1MwBs/YUNznpcFYbw@public.gmane.org, Jack Wang , Pavel Begunkov , drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org On Wed, Mar 23, 2022 at 06:38:22AM +0900, Ryusuke Konishi wrote: > This looks because the mask of GFP_KERNEL is removed along with > the removal of mpage_alloc(). > > The default value of the gfp flag is set to GFP_HIGHUSER_MOVABLE by > inode_init_always(). > So, __GFP_HIGHMEM hits the gfp warning at bio_alloc() that > do_mpage_readpage() calls. Yeah. Let's try this to match the iomap code: diff --git a/fs/mpage.c b/fs/mpage.c index 9ed1e58e8d70b..d465883edf719 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -148,13 +148,11 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) int op = REQ_OP_READ; unsigned nblocks; unsigned relative_block; - gfp_t gfp; + gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); if (args->is_readahead) { op |= REQ_RAHEAD; - gfp = readahead_gfp_mask(page->mapping); - } else { - gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); + gfp |= __GFP_NORETRY | __GFP_NOWARN; } if (page_has_buffers(page)) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id C7CA3420983 for ; Wed, 23 Mar 2022 07:42:51 +0100 (CET) Date: Wed, 23 Mar 2022 07:42:48 +0100 From: Christoph Hellwig To: Ryusuke Konishi Message-ID: <20220323064248.GA24874@lst.de> References: <20220124091107.642561-1-hch@lst.de> <20220124091107.642561-2-hch@lst.de> <20220322211915.GA2413063@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Jens Axboe , Konstantin Komarov , linux-nfs@vger.kernel.org, linux-nilfs , Andrew Morton , Mike Snitzer , Philipp Reisner , Pavel Begunkov , linux-block@vger.kernel.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= , device-mapper development , "Md . Haris Iqbal" , linux-fsdevel@vger.kernel.org, xen-devel@lists.xenproject.org, Lars Ellenberg , ntfs3@lists.linux.dev, Jack Wang , Christoph Hellwig , Guenter Roeck , drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [dm-devel] [PATCH 01/19] fs: remove mpage_alloc List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Mar 23, 2022 at 06:38:22AM +0900, Ryusuke Konishi wrote: > This looks because the mask of GFP_KERNEL is removed along with > the removal of mpage_alloc(). > > The default value of the gfp flag is set to GFP_HIGHUSER_MOVABLE by > inode_init_always(). > So, __GFP_HIGHMEM hits the gfp warning at bio_alloc() that > do_mpage_readpage() calls. Yeah. Let's try this to match the iomap code: diff --git a/fs/mpage.c b/fs/mpage.c index 9ed1e58e8d70b..d465883edf719 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -148,13 +148,11 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) int op = REQ_OP_READ; unsigned nblocks; unsigned relative_block; - gfp_t gfp; + gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); if (args->is_readahead) { op |= REQ_RAHEAD; - gfp = readahead_gfp_mask(page->mapping); - } else { - gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL); + gfp |= __GFP_NORETRY | __GFP_NOWARN; } if (page_has_buffers(page))