Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp1202007lko; Tue, 13 Jul 2021 19:28:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+zNJdC8u0OS1yDHWIz/SkqTqvR8nnCarRtvi7q3+vDvU8f2XJyU/+5UkX+NIJfCSZeKZ8 X-Received: by 2002:a05:6638:3460:: with SMTP id q32mr3966172jav.70.1626229710836; Tue, 13 Jul 2021 19:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626229710; cv=none; d=google.com; s=arc-20160816; b=NuDLNpt16a61LRg4/Q4+W+Aifq1yR6MnjXFo4PejbCvaEtISCfLEMxKTCsbg4EwCei Y2Yg7uxxvHfnH73cRM5fprZLWv8zcfP0d3jSy2vhdoX31PtbjMFMK/Xk2arPXo05IYn9 vC4xcEdAn/rvBR0zXhTkPwrp+JK2gv+p/PPkalWeTGcPZwpPaCKbevOZD4J60zudyF7+ 5p9b2SczoqboIf3JO/d2G3RMO/2EjajWDZxMGb6tyLd7J/9chjo6S/Ys0gcoZIwuys7x CLDwR6QvZcutoHgKOoHUxhdWWBGUeBcdnwbizBt9KwAJPDFL7KBNDppeSp4K48DDDzw8 rNBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=EMkMOOaIxAqFas79EtObVpTJ3QgnrMOC9HlPxH6pNC8=; b=dejmPHJccUWhA7c/tP6IwU99Tq9LUFeNxSLXpMEEHkxm9+Cg/tInjrfClFn2JDEd/N eopfIwimAtMEE3R9DHU6ZMTIOWfB2QxUgblwO+5449yOfT6H2dBHg7qrPBsbPMROwumK WcsG+7wO8RTwwQ62DAU6uVw689KfWoIFqMEhvs+E1dbb3gxqBVkHNtndYYfscENrsZX4 xR0rXPVT0QSDDDikJgu/MPG+pAl87RiEc3V0kGt5A9+ZLPNELo7EjqnjdAB9dwlO6CSz a8vhBPyR4ACd0agqQxDcUYCYDWktAitjyqeI14W1uSoeYnXHMR8odsv9TpcEZeroSkup 0R5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BKiFegzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si914741ioe.32.2021.07.13.19.28.19; Tue, 13 Jul 2021 19:28:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BKiFegzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237592AbhGNCaQ (ORCPT + 99 others); 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,