Re: [PATCH 00/23] per device dirty throttling -v8

From: JÃrn Engel
Date: Sat Aug 04 2007 - 15:47:12 EST


On Sat, 4 August 2007 21:26:15 +0200, JÃrn Engel wrote:
>
> Given the choice between only "atime" and "noatime" I'd agree with you.
> Heck, I use it myself. But "relatime" seems to combine the best of both
> worlds. It currently just suffers from mount not supporting it in any
> relevant distro.

And here is a completely untested patch to enable it by default. Ingo,
can you see how good this fares compared to "atime" and
"noatime,nodiratime"?

JÃrn

--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
-- Brian W. Kernighan

--- linux-2.6.22_relatime/fs/namespace.c~default_relatime 2007-05-16 02:01:39.000000000 +0200
+++ linux-2.6.22_relatime/fs/namespace.c 2007-08-04 21:36:20.000000000 +0200
@@ -1401,6 +1401,10 @@ long do_mount(char *dev_name, char *dir_
if (data_page)
((char *)data_page)[PAGE_SIZE - 1] = 0;

+#ifdef CONFIG_DEFAULT_RELATIME
+ flags |= MS_RELATIME;
+#endif
+
/* Separate the per-mountpoint flags */
if (flags & MS_NOSUID)
mnt_flags |= MNT_NOSUID;
--- linux-2.6.22_relatime/fs/Kconfig~default_relatime 2007-05-16 02:01:38.000000000 +0200
+++ linux-2.6.22_relatime/fs/Kconfig 2007-08-04 21:39:46.000000000 +0200
@@ -6,6 +6,15 @@ menu "File systems"

if BLOCK

+config DEFAULT_RELATIME
+ bool "Mount all filesystems with 'relatime' by default"
+ default y
+ help
+ Relatime only updates atime once after any file has been changed.
+ Setting this should give a noticeable performance bonus.
+
+ If unsure, say Y.
+
config EXT2_FS
tristate "Second extended fs support"
help
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/