[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070804200038.GA31017@elte.hu>
Date: Sat, 4 Aug 2007 22:00:38 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jörn Engel <joern@...fs.org>,
Jeff Garzik <jeff@...zik.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, linux-mm@...ck.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
miklos@...redi.hu, akpm@...ux-foundation.org, neilb@...e.de,
dgc@....com, tomoki.sekiyama.qu@...achi.com, nikita@...sterfs.com,
trond.myklebust@....uio.no, yingchao.zhou@...il.com,
richard@....demon.co.uk, david@...g.hm
Subject: Re: [PATCH 00/23] per device dirty throttling -v8
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Well, we could make it the default for the kernel (possibly under a
> "fast-atime" config option), and then people can add "atime" or
> "noatime" as they wish, since mount has supported _those_ options for
> a long time.
the patch below implements this, but there's a problem: we only have
MNT_NOATIME, we have no MNT_ATIME option AFAICS. So there's no good way
to detect it when a user _does_ want to have atime :-( Perhaps a boot
option to turn this off? [sucks a bit but keeps the solution within the
kernel.]
Ingo
--------------------------------->
Subject: [patch] add CONFIG_FASTATIME
From: Ingo Molnar <mingo@...e.hu>
add the CONFIG_FASTATIME kernel option, which makes "relatime" the
default for all mounts.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
fs/Kconfig | 10 ++++++++++
fs/namespace.c | 4 ++++
2 files changed, 14 insertions(+)
Index: linux/fs/Kconfig
===================================================================
--- linux.orig/fs/Kconfig
+++ linux/fs/Kconfig
@@ -2060,6 +2060,16 @@ config 9P_FS
endmenu
+config FASTATIME
+ bool "Fast atime support by default"
+ default y
+ help
+ If you say Y here, all your filesystems that do not have
+ the "noatime" or "atime" mount option specified will get
+ the "relatime" option by default, which speeds up atime
+ updates. (atime will only be updated if ctime or mtime
+ is more recent than atime)
+
if BLOCK
menu "Partition Types"
Index: linux/fs/namespace.c
===================================================================
--- linux.orig/fs/namespace.c
+++ linux/fs/namespace.c
@@ -1409,6 +1409,10 @@ long do_mount(char *dev_name, char *dir_
mnt_flags |= MNT_NODIRATIME;
if (flags & MS_RELATIME)
mnt_flags |= MNT_RELATIME;
+#ifdef CONFIG_FASTATIME
+ if (!(flags & (MNT_NOATIME | MNT_NODIRATIME)))
+ mnt_flags |= MNT_RELATIME;
+#endif
flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
MS_NOATIME | MS_NODIRATIME | MS_RELATIME);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists