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 X-Spam-Level: X-Spam-Status: No, score=-18.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2D5DC07E95 for ; Wed, 14 Jul 2021 02:27:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DADD66135A for ; Wed, 14 Jul 2021 02:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237590AbhGNCaQ (ORCPT ); Tue, 13 Jul 2021 22:30:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237375AbhGNCaP (ORCPT ); Tue, 13 Jul 2021 22:30:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DEB6611C0; Wed, 14 Jul 2021 02:27:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626229644; bh=Bj+HpaEPtkQE5eY6vbygK1YC7JiEJPnWWpcKchZsslY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BKiFegzHYXscUYOtgpqkndal3xjPRF+5NV0ZiTfdLdLnSt2JD2JLzSskyKiW7vWVh bhSFm5vTgauPYGP4frZB519ChPzGQw2sualqo971t9yX/5wfidcFUHjJGmcjaZ8xIp nMHfGwVHY0ShUYyfBbfMf0l/+YhGnMfB/WBlOHlqktXZXSpFXCBR0XCCbLauui1ZMl 5ZZn+ckCww9xKYvs7qgN/pjyTB6tEcCAunp44rM33nTSC8lX3krkNEqh3AQcbMajNO If2AfKX2tRJvOLuiZh9iTfC4J+OT8E27gPt72D93sCnYdl6qTxFJtwWm5JksbONTvR fNZHK8ZpYxN6w== Subject: Re: [RFC NO MERGE] f2fs: extent cache: support unaligned extent To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu References: <20210707015815.1978-1-chao@kernel.org> From: Chao Yu Message-ID: Date: Wed, 14 Jul 2021 10:27:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210707015815.1978-1-chao@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/7/7 9:58, Chao Yu wrote: > Compressed inode may suffer read performance issue due to it can not > use extent cache, so I propose to add this unaligned extent support > to improve it. > > Currently, it only works in readonly format f2fs image. > > Unaligned extent: in one compressed cluster, physical block number > will be less than logical block number, so we add an extra physical > block length in extent info in order to indicate such extent status. > > The idea is if one whole cluster blocks are contiguous physically, > once its mapping info was readed at first time, we will cache an > unaligned (or aligned) extent info entry in extent cache, it expects > that the mapping info will be hitted when rereading cluster. > > Merge policy: > - Aligned extents can be merged. > - Aligned extent and unaligned extent can not be merged. > > Signed-off-by: Chao Yu > --- > > I just post this for comments, it passes compiling, w/o any test. > > fs/f2fs/compress.c | 25 ++++++++++++ > fs/f2fs/data.c | 38 +++++++++++++----- > fs/f2fs/extent_cache.c | 90 +++++++++++++++++++++++++++++++++++++----- > fs/f2fs/f2fs.h | 33 +++++++++++++--- > fs/f2fs/node.c | 20 ++++++++++ > 5 files changed, 181 insertions(+), 25 deletions(-) Jaegeuk, any thoughts about this idea? Thanks,