Message ID | 20221126005756.7662-3-jefflexu@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4385119wrr; Fri, 25 Nov 2022 17:01:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mXH7QDM6y7D3TjzhxdKx04qZefalF2m5vyNekfshHPMsbvCNp4XABmvWa+/AnLZMB4Kr4 X-Received: by 2002:a17:902:c406:b0:189:6df9:4f85 with SMTP id k6-20020a170902c40600b001896df94f85mr3197532plk.27.1669424469572; Fri, 25 Nov 2022 17:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669424469; cv=none; d=google.com; s=arc-20160816; b=np20Aw2xEFdUYZ7cBsKJtcmVSWR/qiePgW50NcwuCpT9GN0FNpFR8nf+sjThrh/PB6 NYVgryCr7mXkxUQLiEjflnJdr/PjLpBXv+0LFLsBQxiR/iG8F2cUJnTGd9WNg5RSJ8yv uZEDiH35PGifVCJMGopALkP6bf378vqgH+Nsyt+xt+D+5N0/qHLMr61aXqJrnInv4q7o dfzZJyyU413rymv256PZFk/syC5+i9f8N+G8iUx29lqI2/bNYbY31D6RwJ/K1GHQdz2d INDaQGdNDlgF5+6Y2yPTz3aZoKIXa7qoF5ZpKeRV3cTwIKraT1bfb0kfyw8sDh6nHgr4 thvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TmowinmPna8r5xcroXh7sq+LOfZLpes/ZUZ8thEIJ58=; b=xPM9WGMLLDJ7h6e7UT0eN9rxog6FDN42widWKWl9lwDRhyxgt+NivM2jMG3tk2HL7m O31FtLKGTClnNMGR9giDWpLqTmoSE+rzSUFvA/BPuZuW5rZdyyUglSsWHNePVntFwqKN eJiKnIylqpw4ziUlYLmAWBY7bw64RBAvnv0MP+NO7Jz+Qs73j/5AtoI9GH6ZgXnNDSnR ZGveVpdxq9MvpQOmUwF0VzE3cSVzNrvTj6BCEhyQ8Ew3erkPDXVKYyPh+nkvg0JgCLAa U8Rz//GDR0BJgwD6a+XhcpHnLQK9QSCYeMd8XOPvE+Fd1Kx2QZgHph6Wtcmqr21CR54L of2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020aa796d3000000b005745ec81a33si5143548pfq.309.2022.11.25.17.00.54; Fri, 25 Nov 2022 17:01:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbiKZA6H (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Fri, 25 Nov 2022 19:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbiKZA6E (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 25 Nov 2022 19:58:04 -0500 Received: from out199-13.us.a.mail.aliyun.com (out199-13.us.a.mail.aliyun.com [47.90.199.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6573A5C0E2 for <linux-kernel@vger.kernel.org>; Fri, 25 Nov 2022 16:58:03 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R321e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VVgrtrD_1669424278; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VVgrtrD_1669424278) by smtp.aliyun-inc.com; Sat, 26 Nov 2022 08:57:59 +0800 From: Jingbo Xu <jefflexu@linux.alibaba.com> To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] erofs: enable large folio support for non-compressed format Date: Sat, 26 Nov 2022 08:57:56 +0800 Message-Id: <20221126005756.7662-3-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20221126005756.7662-1-jefflexu@linux.alibaba.com> References: <20221126005756.7662-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750518432993273409?= X-GMAIL-MSGID: =?utf-8?q?1750518432993273409?= |
Series |
erofs: support large folio in fscache mode
|
|
Commit Message
Jingbo Xu
Nov. 26, 2022, 12:57 a.m. UTC
Enable large folio in both device and fscache mode. Then the readahead
routine will pass down large folio containing multiple pages.
Enable this feature for non-compressed format for now, until the
compression part supports large folio later.
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
fs/erofs/fscache.c | 1 +
fs/erofs/inode.c | 1 +
2 files changed, 2 insertions(+)
Comments
Hi Jingbo, On Sat, Nov 26, 2022 at 08:57:56AM +0800, Jingbo Xu wrote: > Enable large folio in both device and fscache mode. Then the readahead ^ large folios in both iomap and fscache modes. I tend to enable iomap/fscache large folios with two patches. Also please see dev-test branch. > routine will pass down large folio containing multiple pages. > > Enable this feature for non-compressed format for now, until the > compression part supports large folio later. ^ large folios > > Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> > --- > fs/erofs/fscache.c | 1 + > fs/erofs/inode.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c > index 0643b205c7eb..d2dd58ce312b 100644 > --- a/fs/erofs/fscache.c > +++ b/fs/erofs/fscache.c > @@ -436,6 +436,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb, > inode->i_size = OFFSET_MAX; > inode->i_mapping->a_ops = &erofs_fscache_meta_aops; > mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); > + mapping_set_large_folios(inode->i_mapping); > Meta inodes currently doesn't need large folios for now, and we don't have readahead policy for these. > ctx->inode = inode; > } > diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c > index ad2a82f2eb4c..85932086d23f 100644 > --- a/fs/erofs/inode.c > +++ b/fs/erofs/inode.c > @@ -295,6 +295,7 @@ static int erofs_fill_inode(struct inode *inode) > goto out_unlock; > } > inode->i_mapping->a_ops = &erofs_raw_access_aops; > + mapping_set_large_folios(inode->i_mapping); > #ifdef CONFIG_EROFS_FS_ONDEMAND > if (erofs_is_fscache_mode(inode->i_sb)) > inode->i_mapping->a_ops = &erofs_fscache_access_aops; > -- > 2.19.1.6.gb485710b >
On 11/26/22 10:16 AM, Gao Xiang wrote: > Hi Jingbo, > > On Sat, Nov 26, 2022 at 08:57:56AM +0800, Jingbo Xu wrote: >> Enable large folio in both device and fscache mode. Then the readahead > > ^ large folios in both iomap and fscache modes. > > I tend to enable iomap/fscache large folios with two patches. > Also please see dev-test branch. Got it. > > >> routine will pass down large folio containing multiple pages. >> >> Enable this feature for non-compressed format for now, until the >> compression part supports large folio later. > > ^ large folios > >> >> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> >> --- >> fs/erofs/fscache.c | 1 + >> fs/erofs/inode.c | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c >> index 0643b205c7eb..d2dd58ce312b 100644 >> --- a/fs/erofs/fscache.c >> +++ b/fs/erofs/fscache.c >> @@ -436,6 +436,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb, >> inode->i_size = OFFSET_MAX; >> inode->i_mapping->a_ops = &erofs_fscache_meta_aops; >> mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); >> + mapping_set_large_folios(inode->i_mapping); >> > > Meta inodes currently doesn't need large folios for now, and > we don't have readahead policy for these. Alright, I will fix this in a quick v2. > >> ctx->inode = inode; >> } >> diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c >> index ad2a82f2eb4c..85932086d23f 100644 >> --- a/fs/erofs/inode.c >> +++ b/fs/erofs/inode.c >> @@ -295,6 +295,7 @@ static int erofs_fill_inode(struct inode *inode) >> goto out_unlock; >> } >> inode->i_mapping->a_ops = &erofs_raw_access_aops; >> + mapping_set_large_folios(inode->i_mapping); >> #ifdef CONFIG_EROFS_FS_ONDEMAND >> if (erofs_is_fscache_mode(inode->i_sb)) >> inode->i_mapping->a_ops = &erofs_fscache_access_aops; >> -- >> 2.19.1.6.gb485710b >>
diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 0643b205c7eb..d2dd58ce312b 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -436,6 +436,7 @@ struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb, inode->i_size = OFFSET_MAX; inode->i_mapping->a_ops = &erofs_fscache_meta_aops; mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); + mapping_set_large_folios(inode->i_mapping); ctx->inode = inode; } diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index ad2a82f2eb4c..85932086d23f 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -295,6 +295,7 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; + mapping_set_large_folios(inode->i_mapping); #ifdef CONFIG_EROFS_FS_ONDEMAND if (erofs_is_fscache_mode(inode->i_sb)) inode->i_mapping->a_ops = &erofs_fscache_access_aops;