[lkml]   [2009]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: relatime: update once per day patches (was: ext3 IO latency measurements)

On Thu, 26 Mar 2009, Theodore Tso wrote:
> I've always thought the right approach would be to have a "atime
> dirty" flag, and update atime, but never flush it out to disk unless
> (a) we're about to unmount the disk, or (b) we need to update some
> other inode in the same inode table block, or (c) we have memory
> pressure and we're trying to evict the inode from the inode cache.

I tried to do that a few years ago (ok, probably more than a few by now).

It was surprisingly hard.

Some of it is absolutely trivial: we already have multiple "dirty" flags
for the inode (I_DIRTY_SYNC vs I_DIRTY_DATASYNC vs I_DIRTY_PAGES). Adding
a I_DIRTY_ATIME bit for unimportant data was trivial.

But at least back then, "sync_inode()" (or whatever) was called without
the reason for doing the sync, so it was really hard to decide whether to
write things out or not.

That may actually have changed these days. We now have that
"writeback_control" thing that we pass around for all the IO.

Heh. I just looked back in the history. That writeback_control thing was
added back in 2002, so it's a _really_ long time since I tried to do that
whole atime thing.

Maybe it's really easy these days.


 \ /
  Last update: 2009-03-26 18:07    [W:0.456 / U:6.908 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site