From mboxrd@z Thu Jan 1 00:00:00 1970 From: Changman Lee Subject: Re: [f2fs-dev] [PATCH] f2fs: add cleancache support Date: Thu, 20 Nov 2014 13:38:51 +0900 Message-ID: <20141120043851.GA3117@lcm> References: <1415856890-2455-1-git-send-email-cm224.lee@samsung.com> <20141114012751.GB49179@jaegeuk-mac02.mot.com> <20141114055302.GD16657@lcm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, dan.magenheimer@oracle.com To: Jaegeuk Kim Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:19444 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753718AbaKTEkJ (ORCPT ); Wed, 19 Nov 2014 23:40:09 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFB0017VMAVQ1C0@mailout1.samsung.com> for linux-fsdevel@vger.kernel.org; Thu, 20 Nov 2014 13:40:07 +0900 (KST) Content-disposition: inline In-reply-to: <20141114055302.GD16657@lcm> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 14, 2014 at 02:53:02PM +0900, Changman Lee wrote: > On Thu, Nov 13, 2014 at 05:27:51PM -0800, Jaegeuk Kim wrote: > > Hi Changman, > > > > On Thu, Nov 13, 2014 at 02:34:50PM +0900, Changman Lee wrote: > > > To use cleancache, fs must explicitly enable cleancache by calling > > > cleancache_init_fs. > > > > Good catch! > > > > Prior to merge this patch, can you share any testing results or performance > > numbers? > > > Not yet, I'll try to get numbers. > Hi, This is the result of kernel compile on xen-4.4 enabled tmem : cleancache and frontswap. I'm afraid that there is little difference by cleancache. The cleancache shows a few cache hits but the effect through it doesn't show. I don't know best benchmark to testify it yet. Finally, I couldn't discover any bug during test. [before patch] 1 2 3 Elapsed time 25:00.67 25:07.09 25:00.38 Major fault 31100 31410 31333 Minor fault 276869398 276869318 276871144 [after patch] 1 2 3 Elapsed time 25:12.34 25:13.29 25:11.99 Major fault 31559 32069 31801 Minor fault 276870283 276868046 276869251 [cleancache] - diff between start and end 1 2 3 failed_gets 1277980 1296355 1300368 invalidates 2588227 2651722 2655285 puts 1289970 1323685 1320623 *succ_gets* 111111 121299 114310 Thanks, Changman > > What condition will be the best way to exploit f2fs and cleancache? > > > Not clear. > I think we can make a cleancache client for f2fs so that can compenstate > a penalty of node pages which are read mostly. > > > Can we confirm that f2fs satisfies most of requirements described by > > cleancache.txt below? > > Good point. > At a quick glance, F2FS seems to satisfy most of requirements. > Through a experimental, I'll try to check side effect. > > > > > Some points for a filesystem to consider: > > > > - The FS should be block-device-based (e.g. a ram-based FS such > > as tmpfs should not enable cleancache) > > - To ensure coherency/correctness, the FS must ensure that all > > file removal or truncation operations either go through VFS or > > add hooks to do the equivalent cleancache "invalidate" operations > > - To ensure coherency/correctness, either inode numbers must > > be unique across the lifetime of the on-disk file OR the > > FS must provide an "encode_fh" function. > > - The FS must call the VFS superblock alloc and deactivate routines > > or add hooks to do the equivalent cleancache calls done there. > > - To maximize performance, all pages fetched from the FS should > > go through the do_mpag_readpage routine or the FS should add > > hooks to do the equivalent (cf. btrfs) > > - Currently, the FS blocksize must be the same as PAGESIZE. This > > is not an architectural restriction, but no backends currently > > support anything different. > > - A clustered FS should invoke the "shared_init_fs" cleancache > > hook to get best performance for some backends. > > > > Thanks, > > > > > > > > Signed-off-by: Changman Lee > > > --- > > > fs/f2fs/super.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > > > index 512ffd8..2ebb960 100644 > > > --- a/fs/f2fs/super.c > > > +++ b/fs/f2fs/super.c > > > @@ -24,6 +24,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > #include "f2fs.h" > > > #include "node.h" > > > @@ -1144,6 +1145,8 @@ try_onemore: > > > if (err) > > > goto free_kobj; > > > } > > > + > > > + cleancache_init_fs(sb); > > > return 0; > > > > > > free_kobj: > > > -- > > > 1.9.1 > > > > > > > > > ------------------------------------------------------------------------------ > > > Comprehensive Server Monitoring with Site24x7. > > > Monitor 10 servers for $9/Month. > > > Get alerted through email, SMS, voice calls or mobile push notifications. > > > Take corrective actions from your mobile device. > > > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > > > _______________________________________________ > > > Linux-f2fs-devel mailing list > > > Linux-f2fs-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel