lkml.org 
[lkml]   [1996]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Newsgroups: linux.dev.kernel
Path: rjs
From: rjs@spider.compart.fi (Riku Saikkonen)
Subject: Re: No atime
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
Sender: rjs@isil.lloke.dna.fi (Riku Saikkonen)
Lines: 41
Organization: I laureloke
Message-ID: <DsvzM4.Gw7@isil.lloke.dna.fi>
References: <199606030835.JAA03620@snowcrash.cymru.net>
Date: Wed, 12 Jun 1996 12:20:28 GMT

Alan Cox (alan@cymru.net) wrote:
>2. Someone try noatime and measure laptop battery life.

And maybe normal hard disk life too, depending on what you do...

One thing where I think this really helps is if you run a system-monitor
program that reads files from /proc every 60 seconds or so. Normally this
update's /'s atime (I think), leading to a hard disk write every 60 seconds
or so, even if the machine is otherwise completely idle.

And I assume that hard disks last longer if you keep them idle for two hours
when you don't use the machine than if you write something useless to it
every minute. I imagine this is what lead to the suggestion on cold.system a
while ago to put parts of the system monitor tools in the kernel (can we say
bloat?)...

This particular thing could be fixed by making a small read-only root
partition, but I don't doubt that there are situations (like the news server
stuff someone mentioned) where this isn't possible.

So... A stupid question, maybe, coming up:

Does this noatime patch really break POSIX conformance? I.e. does it really
not update the atimes at all? If it doesn't, wouldn't it be better to put
the atime updates in the kernel's disk-write cache and not flush the cache
if there are only atime updates to be flushed?

I have little knowledge of the internals of the kernel's disk cache
mechanism, but... I guess this would require some sort of `important' flag
for entries in the disk write cache. And then the buffering algorithm would
decide not to flush the buffers if there's only non-important stuff in them.
But if there's anything flagged as `important' there (and maybe if someone
asks for a disk _read_, as the disk has to spin up then), flush the
non-important stuff too.

This shouldn't break POSIX, at least not in a way that applications could
notice, if a read of the atime looked at the (still unflushed) write cache
before reading the (maybe obsolete) atime from the disk.

--
-=- Rjs -=- rjs@spider.compart.fi - http://isil.lloke.dna.fi/rjs/


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.051 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site