public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Vlad <vladc6@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Noatime vs relatime
Date: Fri, 10 Aug 2007 15:29:27 -0400	[thread overview]
Message-ID: <46BCBC97.2080507@tmr.com> (raw)
In-Reply-To: <233939.75965.qm@web54403.mail.yahoo.com>

Vlad wrote:
> Linus Torvalds wrote:
>> What we could do is to make "relatime" updates a bit smarter.
>>
>> A bit smarter would be:
>>
>> - update atime if the old atime is <= than mtime/ctime
>>
>> Logic: things like mailers can care about whether some
>> new state has 
>> been read or not. This is the current relatime.
>>
>> - update atime if the old atime is more than X seconds
>> in the past (defaulting to one day or something)
>>
>> Logic: things like tmpwatch and backup
>> software may want to remove 
>> stuff that hasn't been touched in a long time, but they
>> sure don't care about "exact" atime.
> 
> Relatime seems to be wasteful of both IO resources _and_ CPU cycles.
> Instead of performing a single IO operation (as atime does), relatime
> performs at least three IO operations and three CPU-dependent
> operations:
> 
> 1) a read IO operation to find out the old atime
> 2) a read IO operation to find out the old ctime
> 3) a read IO operation to find out the old mtime

Reading a value in memory into a CPU register is not normally considered 
an I/O operation.

> 4) Comparison of "old atime is <= than mtime/ctime"
> 5) Find out current time
> 6) Comparison of "current time minus old atime is > X"
> 
> People are going to wonder why all of the sudden everything is running
> so slow due to atimes being updated after a long break.
> 
> I suggest treating atime as if it were a subsystem that is scheduled
> for an overhaul - there have been plenty of those in the past. Give
> users/distros a config option to disable atime, but default this
> option in favor of atime for a couple of kernel release cycles. Print
> a line in dmesg that states something like:
> 
> "Warning: Atime will be disabled by default in future kernel versions,
> but you will still be able to turn it on when configuring the kernel."
> 
> This should give a heads-up to the 0.001% of people who still use
> atime so that they know to customize this option or start using modern
> file-monitoring techniques like inotify.
> 
> Vlad
> 
> 
>        
> ____________________________________________________________________________________
> Pinpoint customers who are looking for what you sell. 
> http://searchmarketing.yahoo.com/


-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

  parent reply	other threads:[~2007-08-10 19:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 14:26 Noatime vs relatime Vlad
2007-08-10 14:44 ` Xavier Bestel
2007-08-10 14:47 ` Arjan van de Ven
2007-08-10 14:51 ` Michael Poole
2007-08-10 15:10 ` Matti Aarnio
2007-08-10 22:55   ` Rene Herman
2007-08-10 19:29 ` Bill Davidsen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-10 16:32 pointman
     [not found] <8QDOX-78C-15@gated-at.bofh.it>
     [not found] ` <8QErs-8dz-1@gated-at.bofh.it>
     [not found]   ` <8QLCI-2zy-15@gated-at.bofh.it>
2007-08-11  8:33     ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46BCBC97.2080507@tmr.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vladc6@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox