From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ram Pai Subject: Re: VFS hot tracking: How to calculate data temperature? Date: Tue, 6 Nov 2012 17:36:38 +0800 Message-ID: <20121106093638.GA6835@ram-ThinkPad-T61> References: <20121102084109.GA19753@gmail.com> Reply-To: Ram Pai Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT To: Zhi Yong Wu , linux-fsdevel@vger.kernel.org, linuxram@linux.vnet.ibm.com, Dave Chinner , cmm@us.ibm.com, Ben Chociej , James Northrup Return-path: Received: from e5.ny.us.ibm.com ([32.97.182.145]:39120 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943Ab2KFJgt convert rfc822-to-8bit (ORCPT ); Tue, 6 Nov 2012 04:36:49 -0500 Received: from /spool/local by e5.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Nov 2012 04:36:48 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 275FB38C8026 for ; Tue, 6 Nov 2012 04:36:46 -0500 (EST) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA69ajnU294120 for ; Tue, 6 Nov 2012 04:36:45 -0500 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA69ahHL014247 for ; Tue, 6 Nov 2012 02:36:45 -0700 Content-Disposition: inline In-Reply-To: <20121102084109.GA19753@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 02, 2012 at 04:41:09PM +0800, Zheng Liu wrote: > On Fri, Nov 02, 2012 at 02:38:29PM +0800, Zhi Yong Wu wrote: > > Here also has another question. > > > > How to save the file temperature among the umount to be able to > > preserve the file tempreture after reboot? > > > > This above is the requirement from DB product. > > I thought that we can save file temperature in its inode struct, that > > is, add one new field in struct inode, then this info will be written > > to disk with inode. > > > > Any comments or ideas are appreciated, thanks. > > Hi Zhiyong, > > I think that we might define a callback function. If a filesystem wants > to save these data, it can implement a function to save them. The > filesystem can decide whether adding it or not by themselves. > > BTW, actually I don't really care about how to save these data because I > only want to observe which file is accessed in real time, which is very > useful for me to track a problem in our product system. To me, umounting a filesystem is a way of explicitly telling the VFS that the filesystem's data is not hot anymore. So probably, it really does not make sense to store temperatures across mount boundaries. RP