Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759602AbXHEPDI (ORCPT ); Sun, 5 Aug 2007 11:03:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754958AbXHEPCx (ORCPT ); Sun, 5 Aug 2007 11:02:53 -0400 Received: from thunk.org ([69.25.196.29]:36908 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbXHEPCv (ORCPT ); Sun, 5 Aug 2007 11:02:51 -0400 Date: Sun, 5 Aug 2007 11:00:29 -0400 From: Theodore Tso To: Andi Kleen Cc: Ingo Molnar , Linus Torvalds , Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, miklos@szeredi.hu, akpm@linux-foundation.org, neilb@suse.de, dgc@sgi.com, tomoki.sekiyama.qu@hitachi.com, nikita@clusterfs.com, trond.myklebust@fys.uio.no, yingchao.zhou@gmail.com, richard@rsk.demon.co.uk Subject: Re: [PATCH 00/23] per device dirty throttling -v8 Message-ID: <20070805150029.GB28263@thunk.org> Mail-Followup-To: Theodore Tso , Andi Kleen , Ingo Molnar , Linus Torvalds , Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, miklos@szeredi.hu, akpm@linux-foundation.org, neilb@suse.de, dgc@sgi.com, tomoki.sekiyama.qu@hitachi.com, nikita@clusterfs.com, trond.myklebust@fys.uio.no, yingchao.zhou@gmail.com, richard@rsk.demon.co.uk References: <20070803123712.987126000@chello.nl> <20070804063217.GA25069@elte.hu> <20070804070737.GA940@elte.hu> <20070804103347.GA1956@elte.hu> <20070804163733.GA31001@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2027 Lines: 40 On Sun, Aug 05, 2007 at 02:26:53AM +0200, Andi Kleen wrote: > I always thought the right solution would be to just sync atime only > very very lazily. This means if a inode is only dirty because of an > atime update put it on a "only write out when there is nothing to do > or the memory is really needed" list. As I've mentioend earlier, the memory balancing issues that arise when we add an "atime dirty" bit scare me a little. It can be addressed, obviously, but at the cost of more code complexity. An alternative is to simply have a tunable parameter, via either a mount option or stashed in the superblock which controls atime's granularity guarantee. That is, only update the atime if it is older than some set time that could be configurable as a mount option or in the superblock. Most of the time, an HSM system simply wants to know if a file has been used sometime "recently", where recently might be measured in hours or in days. This is IMHO slightly better than relatime, since it keeps the spirit of the atime update, while keeping the performance impact to a very minimal (and tunable) level. - Ted P.S. Yet alternative is to specify noatime on an individual file/directory basis. We've had this capability for a *long* time, and if a distro were to set noatime for all files in certain hierarchies (i.e., /usr/include) and certain top-level directories (since the chattr +A flag is inherited), I think folks would find that this would reduce the I/O traffic of noatime by a huge amount. This also would be 100% POSIX compliant, since we are extending the filesystem and setting certain files to use it. But if users want to know when was the last time they looked at a particular file in their home directory, they would still have that facility. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/