From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Zarochentsev Subject: Re: reiser4 and laptop_mode Date: Wed, 19 Oct 2005 12:33:47 +0400 Message-ID: <200510191233.48315.zam@namesys.com> References: <19812996093.20051017162429@usu.ru> <43545DCF.1070301@namesys.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: Content-Disposition: inline List-Id: Content-Type: text/plain; charset="us-ascii" To: Cc: reiserfs-list@namesys.com On Tuesday 18 October 2005 06:34, Gregory Maxwell wrote: > On 10/17/05, Hans Reiser wrote: > > > In fact, if you have enough RAM, you won't ever touch the > > >disk -- deleting a file before it's committed means it never touches > > > disk. > > > > > >It is not as spindown-friendly as laptop_mode, which notices when the > > >drive has to spin up anyway (maybe through a read) and flushes all > > >writes. Don't know if they are compatible. > > > > We should work to integrate well with it. Zam, can you look at that? > > Thanks. > > Actually, laptop mode flushes when there is a write and sync all > pending transactions just before spindown. (delaying the write as long > as possible to hopefully get as much in one pass as possible). Does the kernel really know when the disk spins down? > In the future when enough API is exposed to make a nice interface for > multi-syscall transactions with partial sync (i.e. only forced syncs > of blocks related to transactions which demand physical fixation), it > would be nice if the commit logic were smart enough to grab other > nearby small transactions and batch them into the same commit. If there is a fs-specific 'prepare-to-disk-spindown' hook we can scan the atom list and commit all atoms which may cause the disk to be woken up too early. -- Alex.