From patchwork Mon Nov 11 04:31:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zangyangyang1 X-Patchwork-Id: 13870233 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 C76C0D12D71 for ; Mon, 11 Nov 2024 04:47:10 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tAMKR-0006g0-FO; Mon, 11 Nov 2024 04:47:07 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tAMKQ-0006fu-4V for linux-f2fs-devel@lists.sourceforge.net; Mon, 11 Nov 2024 04:47:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Cb9kxIxTB4hN/2bwYH/DzwuMji7+6l/cH7U3EEtV6cM=; b=NQJw7pimK/XGCSsulybWCP0PYE rhJslJo8gdppDwX6zp8y1zKU5YdJN2/lIRqMQyCXx7BLpKzp22JBNk4TtiCFkk0hBQI2PTg84OrK8 ws9kDxFsKZSNOs/DVvw2Nsw35loC19hqDFCE2ErHxvdm03SKKzNJZ3HMHUnFTdR8xq7Q=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:CC:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Cb9kxIxTB4hN/2bwYH/DzwuMji7+6l/cH7U3EEtV6cM=; b=d wAxOV9akACjSn+RdbPyJ32takLw8DUbF/bedr1lJL7jWyLTUb4N1gaxTknekbh0UumRvhuMRvm6RW ympYp3wj3eYGln3KANeaDrY+kPkBEFPtyZBBV7AM458zSAuXZgDgE2FX6HLMloZRamdmHJuFeyR+l l6oHYTYTC2gDgJLA=; Received: from outboundhk.mxmail.xiaomi.com ([118.143.206.90]) by sfi-mx-2.v28.lw.sourceforge.com with esmtp (Exim 4.95) id 1tAMKO-0008Ku-HC for linux-f2fs-devel@lists.sourceforge.net; Mon, 11 Nov 2024 04:47:06 +0000 X-CSE-ConnectionGUID: dYd0hPmPRWe0Gi2iPRsQ+Q== X-CSE-MsgGUID: FObFf8BDSkCih4PgzoUiig== X-IronPort-AV: E=Sophos;i="6.12,144,1728921600"; d="scan'208";a="100694526" To: Date: Mon, 11 Nov 2024 12:31:06 +0800 Message-ID: <20241111043106.864722-1-zangyangyang1@xiaomi.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Originating-IP: [10.149.39.118] X-ClientProxiedBy: yz-mbx05.mioffice.cn (10.237.88.125) To bj-mbx11.mioffice.cn (10.237.8.131) X-Headers-End: 1tAMKO-0008Ku-HC Subject: [f2fs-dev] [PATCH] f2fs: cache more dentry pages X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: zangyangyang1 via Linux-f2fs-devel From: zangyangyang1 Reply-To: zangyangyang1 Cc: jaegeuk@kernel.org, zangyangyang1 , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net f2fs_find_data_page is used to find dentry pages, I think we should cache more dentry pages. Signed-off-by: zangyangyang1 --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.43.2 #/******±¾Óʼþ¼°Æ丽¼þº¬ÓÐСÃ×¹«Ë¾µÄ±£ÃÜÐÅÏ¢£¬½öÏÞÓÚ·¢Ë͸øÉÏÃæµØÖ·ÖÐÁгöµÄ¸öÈË»òȺ×é¡£½ûÖ¹ÈκÎÆäËûÈËÒÔÈκÎÐÎʽʹÓ㨰üÀ¨µ«²»ÏÞÓÚÈ«²¿»ò²¿·ÖµØй¶¡¢¸´ÖÆ¡¢»òÉ¢·¢£©±¾ÓʼþÖеÄÐÅÏ¢¡£Èç¹ûÄú´íÊÕÁ˱¾Óʼþ£¬ÇëÄúÁ¢¼´µç»°»òÓʼþ֪ͨ·¢¼þÈ˲¢É¾³ý±¾Óʼþ£¡ This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/# diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 402e00d54c0b..71ca987fe7cd 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1286,7 +1286,7 @@ struct page *f2fs_find_data_page(struct inode *inode, pgoff_t index, struct address_space *mapping = inode->i_mapping; struct page *page; - page = find_get_page(mapping, index); + page = find_get_page_flags(mapping, index, FGP_ACCESSED); if (page && PageUptodate(page)) return page; f2fs_put_page(page, 0);