Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14207030rwb; Sun, 27 Nov 2022 19:54:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf77USI4rVs+FmRNk1t76iHrxnpaki6JOq0tfOuvV6adYlLB47j14YL0fIGoGUoUpiIspg1m X-Received: by 2002:a63:f510:0:b0:478:1020:b1e6 with SMTP id w16-20020a63f510000000b004781020b1e6mr3705765pgh.561.1669607690267; Sun, 27 Nov 2022 19:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669607690; cv=none; d=google.com; s=arc-20160816; b=CrzIP4qHY/vVKnLSkoXwpSiLlivoA3PGPNgNxojSiemGZT+HpoyjGZutDwNAnqyu1+ yU5N7IfAvl0LoVafCk6T9ATUMGFitefwyMj7k6L1Y2wO1SFqktpOldYivLJwUCXCI3Nn 6eOf8k3ajKjAimMja6iNUyioIuwHxTwYurwJVZzWUPZ2tgND/BUp7E0IPIVEza9UHFup I3/IRLy1szsX6Fb96X8iLVaoxv0nLSPMrAXmGpRwUgCAlF2QOH4pcKf2dh47NhBHTnOa DEYy1FxCUhxgC4E+9AGVadTDurn6pQfG55UxPlqU89O1im05MnKTifi8PHRib+WBn2ih PIBA== 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=V6I+Llukrgf3XWrmueoAL02LNWGTNkLP3AP1wt6QDnY=; b=Dx0mBa5aEmZhSgTnj+QX6DAi1TqGNeM+BjFqnsh1AVCK+gbRZllnnS347+kE7OqXKr thDHhHhp+MLVjW5Vcbe0cS2lvSzM2cRbLqV9neTpy8lMblgUi6MJR4TLFWlv6DQH066W GXeqPJqKE4x7Imji/Z85cjuJWOFyNUxYs6FafeAudxGELS1PJ8FUE7eGBArg3TkmZS59 IkAqk8D/xFeGYOJKy+sW191mQce3Zptj8wWnDkDOrkF6EaQmtIrtiQN+OpEXLISe6+/D UM5+5SixQ3STg0a/cNrfDLFJjD9lzdTci/3V4EBg/aTZxiCYhJSuk+xxub4M+C9MPMBm YpvQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr10-20020a17090b4b8a00b00212c87edbcesi15020604pjb.76.2022.11.27.19.54.39; Sun, 27 Nov 2022 19:54:50 -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 S229814AbiK1CuY (ORCPT + 85 others); Sun, 27 Nov 2022 21:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbiK1CuS (ORCPT ); Sun, 27 Nov 2022 21:50:18 -0500 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADC98C77 for ; Sun, 27 Nov 2022 18:50:16 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R251e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VVnULt1_1669603813; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VVnULt1_1669603813) by smtp.aliyun-inc.com; Mon, 28 Nov 2022 10:50:14 +0800 From: Jingbo Xu To: xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] erofs: enable large folios for fscache mode Date: Mon, 28 Nov 2022 10:50:11 +0800 Message-Id: <20221128025011.36352-3-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20221128025011.36352-1-jefflexu@linux.alibaba.com> References: <20221128025011.36352-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: X-Mailing-List: linux-kernel@vger.kernel.org Enable large folios for fscache mode. Enable this feature for non-compressed format for now, until the compression part supports large folios later. One thing worth noting is that, the feature is not enabled for the meta data routine since meta inodes don't need large folios for now, nor do they support readahead yet. Signed-off-by: Jingbo Xu --- fs/erofs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c index e457b8a59ee7..85932086d23f 100644 --- a/fs/erofs/inode.c +++ b/fs/erofs/inode.c @@ -295,8 +295,7 @@ static int erofs_fill_inode(struct inode *inode) goto out_unlock; } inode->i_mapping->a_ops = &erofs_raw_access_aops; - if (!erofs_is_fscache_mode(inode->i_sb)) - mapping_set_large_folios(inode->i_mapping); + 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