2008-11-26 19:55:18

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH 1/2] relatime: Make atime updates more useful

Allow atime to be updated once per day even with relatime enabled. This
lets utilities like tmpreaper (which deletes files based on last access
time) continue working.

Signed-off-by: Matthew Garrett <[email protected]>

---

Updated version of Ingo's patch from last year - this section is
identical.

commit 2c145e187600ca961715fa82ae3ae7919d744bc9
Author: Matthew Garrett <[email protected]>
Date: Wed Nov 26 17:44:07 2008 +0000

Make relatime smarter

Allow atime to be updated once per day even with relatime. This lets
utilities like tmpreaper (which delete files based on last access time)
continue working.

diff --git a/fs/inode.c b/fs/inode.c
index 0487ddb..348fa16 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1179,6 +1179,41 @@ sector_t bmap(struct inode * inode, sector_t block)
}
EXPORT_SYMBOL(bmap);

+/*
+ * Relative atime updates frequency (default: 1 day):
+ */
+int relatime_interval __read_mostly = 24*60*60;
+
+/*
+ * With relative atime, only update atime if the
+ * previous atime is earlier than either the ctime or
+ * mtime.
+ */
+static int relatime_need_update(struct inode *inode, struct timespec now)
+{
+ /*
+ * Is mtime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
+ return 1;
+ /*
+ * Is ctime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
+ return 1;
+
+ /*
+ * Is the previous atime value older than the update interval?
+ * If yes, update atime:
+ */
+ if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
+ return 1;
+ /*
+ * Good, we can skip the atime update:
+ */
+ return 0;
+}
+
/**
* touch_atime - update the access time
* @mnt: mount the inode is accessed on
@@ -1206,17 +1241,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
goto out;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
goto out;
- if (mnt->mnt_flags & MNT_RELATIME) {
- /*
- * With relative atime, only update atime if the previous
- * atime is earlier than either the ctime or mtime.
- */
- if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
- timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
- goto out;
- }

now = current_fs_time(inode->i_sb);
+
+ if (mnt->mnt_flags & MNT_RELATIME)
+ if (!relatime_need_update(inode, now))
+ goto out;
if (timespec_equal(&inode->i_atime, &now))
goto out;


--
Matthew Garrett | [email protected]


2008-11-26 19:58:52

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH 2/2] relatime: Allow making relatime the default behaviour

Allow the kernel to enable relatime on all mounts by default. This can
be configured at build time or by a kernel parameter or sysctl. Also add
an MS_NORELATIME mount option to allow the default to be overridden for
specific mount points.

Signed-off-by: Matthew Garrett <[email protected]>

---

Updated version of Ingo's patch, but adds MS_NORELATIME. util-linux will
need updating to match if this is merged.

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d..eba3b07 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -616,6 +616,10 @@ and is between 256 and 4096 characters. It is defined in the file
This is a 16-member array composed of values
ranging from 0-255.

+ default_relatime=
+ [FS] mount all filesystems with relative atime
+ updates by default.
+
vt.default_utf8=
[VT]
Format=<0|1>
@@ -1847,6 +1851,10 @@ and is between 256 and 4096 characters. It is defined in the file
[KNL, SMP] Set scheduler's default relax_domain_level.
See Documentation/cpusets.txt.

+ relatime_interval=
+ [FS] relative atime update frequency, in seconds.
+ (default: 1 day: 86400 seconds)
+
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area

reservetop= [X86-32]
diff --git a/fs/Kconfig b/fs/Kconfig
index 522469a..fcd3d48 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -1546,6 +1546,29 @@ config 9P_FS

endif # NETWORK_FILESYSTEMS

+config DEFAULT_RELATIME
+ bool "Mount all filesystems with relatime by default"
+ default y
+ help
+ If you say Y here, all your filesystems will be mounted
+ with the "relatime" mount option. This eliminates many atime
+ ('file last accessed' timestamp) updates (which otherwise
+ is performed on every file access and generates a write
+ IO to the inode) and thus speeds up IO. Atime is still updated,
+ but only once per day.
+
+ The mtime ('file last modified') and ctime ('file created')
+ timestamp are unaffected by this change.
+
+ Use the "norelatime" kernel boot option to turn off this
+ feature.
+
+config DEFAULT_RELATIME_VAL
+ int
+ default "1" if DEFAULT_RELATIME
+ default "0"
+
+
if BLOCK
menu "Partition Types"

diff --git a/fs/inode.c b/fs/inode.c
index 348fa16..51e9ae1 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1185,6 +1185,17 @@ EXPORT_SYMBOL(bmap);
int relatime_interval __read_mostly = 24*60*60;

/*
+ * Allow overriding the default relatime value on the kernel command line
+ */
+static int __init set_relatime_interval(char *str)
+{
+ get_option(&str, &relatime_interval);
+
+ return 1;
+}
+__setup("relatime_interval=", set_relatime_interval);
+
+/*
* With relative atime, only update atime if the
* previous atime is earlier than either the ctime or
* mtime.
diff --git a/fs/namespace.c b/fs/namespace.c
index 65b3dc8..76f30b5 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1883,6 +1883,24 @@ int copy_mount_options(const void __user * data, unsigned long *where)
}

/*
+ * Allow users to disable (or enable) atime updates via a .config
+ * option or via the boot line, or via /proc/sys/fs/default_relatime:
+ */
+int default_relatime __read_mostly = CONFIG_DEFAULT_RELATIME_VAL;
+
+static int __init set_default_relatime(char *str)
+{
+ get_option(&str, &default_relatime);
+
+ printk(KERN_INFO "Mount all filesystems with"
+ "default relative atime updates: %s.\n",
+ default_relatime ? "enabled" : "disabled");
+
+ return 1;
+}
+__setup("default_relatime=", set_default_relatime);
+
+/*
* Flags is a 32-bit value that allows up to 31 non-fs dependent flags to
* be given to the mount() call (ie: read-only, no-dev, no-suid etc).
*
@@ -1930,6 +1948,11 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
mnt_flags |= MNT_NODIRATIME;
if (flags & MS_RELATIME)
mnt_flags |= MNT_RELATIME;
+ else if (default_relatime &&
+ !(flags & (MS_NOATIME | MS_NODIRATIME | MS_NORELATIME))) {
+ mnt_flags |= MNT_RELATIME;
+ flags |= MS_RELATIME;
+ }
if (flags & MS_RDONLY)
mnt_flags |= MNT_READONLY;

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0dcdd94..a4db010 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -135,6 +135,7 @@ extern int dir_notify_enable;
#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
#define MS_I_VERSION (1<<23) /* Update inode I_version field */
+#define MS_NORELATIME (1<<24) /* Disable relatie even if the default */
#define MS_ACTIVE (1<<30)
#define MS_NOUSER (1<<31)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index cab2a85..71c7bc0 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -112,4 +112,7 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name);

+extern int default_relatime;
+extern int relatime_interval;
+
#endif /* _LINUX_MOUNT_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9d048fa..872c3d3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,6 +29,7 @@
#include <linux/utsname.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
+#include <linux/mount.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kobject.h>
@@ -1334,6 +1335,22 @@ static struct ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "default_relatime",
+ .data = &default_relatime,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "relatime_interval",
+ .data = &relatime_interval,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{
.ctl_name = CTL_UNNUMBERED,


--
Matthew Garrett | [email protected]

2008-11-26 21:11:51

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH 2/2] relatime: Allow making relatime the default behaviour

On Wed, Nov 26, 2008 at 07:58:24PM +0000, Matthew Garrett wrote:
> +#define MS_NORELATIME (1<<24) /* Disable relatie even if the default */

typo

Otherwise, looks good.

Reviewed-by: Matthew Wilcox <[email protected]>

Instead of using __setup, could we use core_param() for these two
parameters? I'm not sure that core_param are exposed in /sys or /proc
anywhere ... if we could fix that, I think it'd simplify this patch
enormously.

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-11-26 22:40:21

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 2/2] relatime: Allow making relatime the default behaviour

Matthew Garrett wrote:
> Allow the kernel to enable relatime on all mounts by default. This can
> be configured at build time or by a kernel parameter or sysctl. Also add
> an MS_NORELATIME mount option to allow the default to be overridden for
> specific mount points.
>
> Signed-off-by: Matthew Garrett <[email protected]>
>
> ---

Hi,

Please use diffstat for all (non-trivial) patches.
or whatever git calls it.

Comments below...

> Updated version of Ingo's patch, but adds MS_NORELATIME. util-linux will
> need updating to match if this is merged.
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index e0f346d..eba3b07 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -616,6 +616,10 @@ and is between 256 and 4096 characters. It is defined in the file
> This is a 16-member array composed of values
> ranging from 0-255.
>
> + default_relatime=
> + [FS] mount all filesystems with relative atime
> + updates by default.
> +

I had rather see it called "relatime_default" fwiw.

> vt.default_utf8=
> [VT]
> Format=<0|1>
> @@ -1847,6 +1851,10 @@ and is between 256 and 4096 characters. It is defined in the file
> [KNL, SMP] Set scheduler's default relax_domain_level.
> See Documentation/cpusets.txt.
>
> + relatime_interval=
> + [FS] relative atime update frequency, in seconds.
> + (default: 1 day: 86400 seconds)
> +
> reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
>
> reservetop= [X86-32]
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 522469a..fcd3d48 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -1546,6 +1546,29 @@ config 9P_FS
>
> endif # NETWORK_FILESYSTEMS
>
> +config DEFAULT_RELATIME
> + bool "Mount all filesystems with relatime by default"
> + default y
> + help
> + If you say Y here, all your filesystems will be mounted
> + with the "relatime" mount option. This eliminates many atime
> + ('file last accessed' timestamp) updates (which otherwise
> + is performed on every file access and generates a write
> + IO to the inode) and thus speeds up IO. Atime is still updated,
> + but only once per day.
> +
> + The mtime ('file last modified') and ctime ('file created')
> + timestamp are unaffected by this change.
> +
> + Use the "norelatime" kernel boot option to turn off this
> + feature.
> +
> +config DEFAULT_RELATIME_VAL
> + int
> + default "1" if DEFAULT_RELATIME
> + default "0"
> +
> +
> if BLOCK
> menu "Partition Types"
>
> diff --git a/fs/inode.c b/fs/inode.c
> index 348fa16..51e9ae1 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -1185,6 +1185,17 @@ EXPORT_SYMBOL(bmap);
> int relatime_interval __read_mostly = 24*60*60;
>
> /*
> + * Allow overriding the default relatime value on the kernel command line
> + */
> +static int __init set_relatime_interval(char *str)
> +{
> + get_option(&str, &relatime_interval);
> +
> + return 1;
> +}
> +__setup("relatime_interval=", set_relatime_interval);
> +
> +/*
> * With relative atime, only update atime if the
> * previous atime is earlier than either the ctime or
> * mtime.
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 65b3dc8..76f30b5 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -1883,6 +1883,24 @@ int copy_mount_options(const void __user * data, unsigned long *where)
> }
>
> /*
> + * Allow users to disable (or enable) atime updates via a .config
> + * option or via the boot line, or via /proc/sys/fs/default_relatime:
> + */
> +int default_relatime __read_mostly = CONFIG_DEFAULT_RELATIME_VAL;
> +
> +static int __init set_default_relatime(char *str)
> +{
> + get_option(&str, &default_relatime);
> +
> + printk(KERN_INFO "Mount all filesystems with"

missing a space between "with" and "default".

> + "default relative atime updates: %s.\n",
> + default_relatime ? "enabled" : "disabled");
> +
> + return 1;
> +}
> +__setup("default_relatime=", set_default_relatime);
> +
> +/*
> * Flags is a 32-bit value that allows up to 31 non-fs dependent flags to
> * be given to the mount() call (ie: read-only, no-dev, no-suid etc).
> *
> @@ -1930,6 +1948,11 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
> mnt_flags |= MNT_NODIRATIME;
> if (flags & MS_RELATIME)
> mnt_flags |= MNT_RELATIME;
> + else if (default_relatime &&
> + !(flags & (MS_NOATIME | MS_NODIRATIME | MS_NORELATIME))) {
> + mnt_flags |= MNT_RELATIME;
> + flags |= MS_RELATIME;
> + }
> if (flags & MS_RDONLY)
> mnt_flags |= MNT_READONLY;
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 0dcdd94..a4db010 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -135,6 +135,7 @@ extern int dir_notify_enable;
> #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
> #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
> #define MS_I_VERSION (1<<23) /* Update inode I_version field */
> +#define MS_NORELATIME (1<<24) /* Disable relatie even if the default */

relatime

> #define MS_ACTIVE (1<<30)
> #define MS_NOUSER (1<<31)



--
~Randy

2008-11-27 15:01:45

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH v2 1/2] relatime: Make relatime behaviour smarter

Make relatime smarter

Allow atime to be updated once per day even with relatime. This lets
utilities like tmpreaper (which delete files based on last access time)
continue working.

---

Subset of Ingo's original patch, rediffed against current git

diff --git a/fs/inode.c b/fs/inode.c
index 0487ddb..348fa16 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1179,6 +1179,41 @@ sector_t bmap(struct inode * inode, sector_t block)
}
EXPORT_SYMBOL(bmap);

+/*
+ * Relative atime updates frequency (default: 1 day):
+ */
+int relatime_interval __read_mostly = 24*60*60;
+
+/*
+ * With relative atime, only update atime if the
+ * previous atime is earlier than either the ctime or
+ * mtime.
+ */
+static int relatime_need_update(struct inode *inode, struct timespec now)
+{
+ /*
+ * Is mtime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
+ return 1;
+ /*
+ * Is ctime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
+ return 1;
+
+ /*
+ * Is the previous atime value older than the update interval?
+ * If yes, update atime:
+ */
+ if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
+ return 1;
+ /*
+ * Good, we can skip the atime update:
+ */
+ return 0;
+}
+
/**
* touch_atime - update the access time
* @mnt: mount the inode is accessed on
@@ -1206,17 +1241,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
goto out;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
goto out;
- if (mnt->mnt_flags & MNT_RELATIME) {
- /*
- * With relative atime, only update atime if the previous
- * atime is earlier than either the ctime or mtime.
- */
- if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
- timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
- goto out;
- }

now = current_fs_time(inode->i_sb);
+
+ if (mnt->mnt_flags & MNT_RELATIME)
+ if (!relatime_need_update(inode, now))
+ goto out;
if (timespec_equal(&inode->i_atime, &now))
goto out;

--
Matthew Garrett | [email protected]

2008-11-27 15:03:59

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

Add support for defaulting to relatime

Allow the kernel to enable relatime on all mounts by default. This can be
configured at build time or by a kernel parameter or sysctl. Also add a
MS_NORELATIME mount option to allow the default to be overridden for specific
mount points.

Signed-off-by: Matthew Garrett <[email protected]>

---

Incorporates Randy's suggestion to change default_relatime to
relatime_default, along with a couple of typographical fixes

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d..1738be9 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1847,6 +1847,14 @@ and is between 256 and 4096 characters. It is defined in the file
[KNL, SMP] Set scheduler's default relax_domain_level.
See Documentation/cpusets.txt.

+ relatime_default=
+ [FS] mount all filesystems with relative atime
+ updates by default.
+
+ relatime_interval=
+ [FS] relative atime update frequency, in seconds.
+ (default: 1 day: 86400 seconds)
+
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area

reservetop= [X86-32]
diff --git a/fs/Kconfig b/fs/Kconfig
index 522469a..fcd3d48 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -1546,6 +1546,29 @@ config 9P_FS

endif # NETWORK_FILESYSTEMS

+config DEFAULT_RELATIME
+ bool "Mount all filesystems with relatime by default"
+ default y
+ help
+ If you say Y here, all your filesystems will be mounted
+ with the "relatime" mount option. This eliminates many atime
+ ('file last accessed' timestamp) updates (which otherwise
+ is performed on every file access and generates a write
+ IO to the inode) and thus speeds up IO. Atime is still updated,
+ but only once per day.
+
+ The mtime ('file last modified') and ctime ('file created')
+ timestamp are unaffected by this change.
+
+ Use the "norelatime" kernel boot option to turn off this
+ feature.
+
+config DEFAULT_RELATIME_VAL
+ int
+ default "1" if DEFAULT_RELATIME
+ default "0"
+
+
if BLOCK
menu "Partition Types"

diff --git a/fs/inode.c b/fs/inode.c
index 348fa16..51e9ae1 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1185,6 +1185,17 @@ EXPORT_SYMBOL(bmap);
int relatime_interval __read_mostly = 24*60*60;

/*
+ * Allow overriding the default relatime value on the kernel command line
+ */
+static int __init set_relatime_interval(char *str)
+{
+ get_option(&str, &relatime_interval);
+
+ return 1;
+}
+__setup("relatime_interval=", set_relatime_interval);
+
+/*
* With relative atime, only update atime if the
* previous atime is earlier than either the ctime or
* mtime.
diff --git a/fs/namespace.c b/fs/namespace.c
index 65b3dc8..b7b72c2 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1883,6 +1883,24 @@ int copy_mount_options(const void __user * data, unsigned long *where)
}

/*
+ * Allow users to disable (or enable) atime updates via a .config
+ * option or via the boot line, or via /proc/sys/fs/relatime_default:
+ */
+int relatime_default __read_mostly = CONFIG_DEFAULT_RELATIME_VAL;
+
+static int __init set_relatime_default(char *str)
+{
+ get_option(&str, &relatime_default);
+
+ printk(KERN_INFO "Mount all filesystems with "
+ "default relative atime updates: %s.\n",
+ relatime_default ? "enabled" : "disabled");
+
+ return 1;
+}
+__setup("relatime_default=", set_relatime_default);
+
+/*
* Flags is a 32-bit value that allows up to 31 non-fs dependent flags to
* be given to the mount() call (ie: read-only, no-dev, no-suid etc).
*
@@ -1930,6 +1948,11 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
mnt_flags |= MNT_NODIRATIME;
if (flags & MS_RELATIME)
mnt_flags |= MNT_RELATIME;
+ else if (relatime_default &&
+ !(flags & (MS_NOATIME | MS_NODIRATIME | MS_NORELATIME))) {
+ mnt_flags |= MNT_RELATIME;
+ flags |= MS_RELATIME;
+ }
if (flags & MS_RDONLY)
mnt_flags |= MNT_READONLY;

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0dcdd94..0dfdce2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -135,6 +135,7 @@ extern int dir_notify_enable;
#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
#define MS_I_VERSION (1<<23) /* Update inode I_version field */
+#define MS_NORELATIME (1<<24) /* Disable relatime even if the default */
#define MS_ACTIVE (1<<30)
#define MS_NOUSER (1<<31)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index cab2a85..2595882 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -112,4 +112,7 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name);

+extern int relatime_default;
+extern int relatime_interval;
+
#endif /* _LINUX_MOUNT_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9d048fa..b570827 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,6 +29,7 @@
#include <linux/utsname.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
+#include <linux/mount.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kobject.h>
@@ -1334,6 +1335,22 @@ static struct ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "relatime_default",
+ .data = &relatime_default,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "relatime_interval",
+ .data = &relatime_interval,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{
.ctl_name = CTL_UNNUMBERED,

--
Matthew Garrett | [email protected]

2008-11-27 15:06:34

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] relatime: Make relatime behaviour smarter


* Matthew Garrett <[email protected]> wrote:

> Make relatime smarter
>
> Allow atime to be updated once per day even with relatime. This lets
> utilities like tmpreaper (which delete files based on last access time)
> continue working.
>
> ---
>
> Subset of Ingo's original patch, rediffed against current git

thanks Matthew for picking this up!

Acked-by: Ingo Molnar <[email protected]>

Ingo

2008-11-27 15:07:49

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour


* Matthew Garrett <[email protected]> wrote:

> Add support for defaulting to relatime
>
> Allow the kernel to enable relatime on all mounts by default. This can be
> configured at build time or by a kernel parameter or sysctl. Also add a
> MS_NORELATIME mount option to allow the default to be overridden for specific
> mount points.
>
> Signed-off-by: Matthew Garrett <[email protected]>
>
> ---
>
> Incorporates Randy's suggestion to change default_relatime to
> relatime_default, along with a couple of typographical fixes

> +config DEFAULT_RELATIME
> + bool "Mount all filesystems with relatime by default"
> + default y

This should not be enabled by default - but distros can set it to
enabled just fine.

Looks good otherwise!

Acked-by: Ingo Molnar <[email protected]>

Ingo

2008-11-27 16:04:09

by Karel Zak

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Thu, Nov 27, 2008 at 03:03:41PM +0000, Matthew Garrett wrote:
> Also add a MS_NORELATIME mount option
[...]
> +#define MS_NORELATIME (1<<24) /* Disable relatime even if the default */

CC: [email protected]

Karel

--
Karel Zak <[email protected]>

2008-11-27 16:37:31

by Alan

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

> +config DEFAULT_RELATIME
> + bool "Mount all filesystems with relatime by default"
> + default y

NAK this

This is a change in behaviour and you don't turn it on by default so most
users will miss it. You don't need it anyway and it doesn't need to be
a kernel configuration option

> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -135,6 +135,7 @@ extern int dir_notify_enable;
> #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
> #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
> #define MS_I_VERSION (1<<23) /* Update inode I_version field */
> +#define MS_NORELATIME (1<<24) /* Disable relatime even if the default */

NAK this

Putting in extra flags to allow the kernel and user space to fight each
other over mount defaults is a recipe for disaster. Take your userspace
mount command and beat it up appropriately. If you want a mount command
that defaults to relatime then ship a mount command that does.

This patch really doesn't make sense.

You add a compile time option to vary behaviour
Because it is compile time you then add a way to change it back at runtime
Because you need to override this you then add a flag to mount

It's rather easier just to fix your distribution mount package.

Also please keep different features in different patches. This patch
muddles together

- Improvements to relatime algorithms for stuff like tmpwatch
- A large chunk of material to do with changing mount behaviour

The two are I think unrelated and the algorithm change looks quite
sensible.

Alan
PS: NTL still hates you ;)

2008-11-27 16:48:19

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Thu, Nov 27, 2008 at 04:35:35PM +0000, Alan Cox wrote:

> Putting in extra flags to allow the kernel and user space to fight each
> other over mount defaults is a recipe for disaster. Take your userspace
> mount command and beat it up appropriately. If you want a mount command
> that defaults to relatime then ship a mount command that does.

Yes, that sounds like a reasonable approach. In that case I'll update
the first to include the support for configuring the timeout.

--
Matthew Garrett | [email protected]

2008-11-27 16:59:49

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH v3] relatime: Make relatime smarter

Make relatime smarter

Allow atime to be updated once per day even with relatime. This lets
utilities like tmpreaper (which delete files based on last access time)
continue working. The time between atime updates can be configured at boot
with the relatime_interval kernel argument, or at runtime through /proc

Signed-off-by: Matthew Garrett <[email protected]>

---

Drop the default behaviour section - as Alan suggests, it can be handled
in userspace. Merge the configuration code into the change in behaviour
patch.

Documentation/kernel-parameters.txt | 4 ++
fs/inode.c | 59 +++++++++++++++++++++++++++++-----
include/linux/mount.h | 2 +
kernel/sysctl.c | 9 +++++
4 files changed, 65 insertions(+), 9 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d..6d0dc0a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1847,6 +1847,10 @@ and is between 256 and 4096 characters. It is defined in the file
[KNL, SMP] Set scheduler's default relax_domain_level.
See Documentation/cpusets.txt.

+ relatime_interval=
+ [FS] relative atime update frequency, in seconds.
+ (default: 1 day: 86400 seconds)
+
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area

reservetop= [X86-32]
diff --git a/fs/inode.c b/fs/inode.c
index 0487ddb..51e9ae1 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1179,6 +1179,52 @@ sector_t bmap(struct inode * inode, sector_t block)
}
EXPORT_SYMBOL(bmap);

+/*
+ * Relative atime updates frequency (default: 1 day):
+ */
+int relatime_interval __read_mostly = 24*60*60;
+
+/*
+ * Allow overriding the default relatime value on the kernel command line
+ */
+static int __init set_relatime_interval(char *str)
+{
+ get_option(&str, &relatime_interval);
+
+ return 1;
+}
+__setup("relatime_interval=", set_relatime_interval);
+
+/*
+ * With relative atime, only update atime if the
+ * previous atime is earlier than either the ctime or
+ * mtime.
+ */
+static int relatime_need_update(struct inode *inode, struct timespec now)
+{
+ /*
+ * Is mtime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
+ return 1;
+ /*
+ * Is ctime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
+ return 1;
+
+ /*
+ * Is the previous atime value older than the update interval?
+ * If yes, update atime:
+ */
+ if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
+ return 1;
+ /*
+ * Good, we can skip the atime update:
+ */
+ return 0;
+}
+
/**
* touch_atime - update the access time
* @mnt: mount the inode is accessed on
@@ -1206,17 +1252,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
goto out;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
goto out;
- if (mnt->mnt_flags & MNT_RELATIME) {
- /*
- * With relative atime, only update atime if the previous
- * atime is earlier than either the ctime or mtime.
- */
- if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
- timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
- goto out;
- }

now = current_fs_time(inode->i_sb);
+
+ if (mnt->mnt_flags & MNT_RELATIME)
+ if (!relatime_need_update(inode, now))
+ goto out;
if (timespec_equal(&inode->i_atime, &now))
goto out;

diff --git a/include/linux/mount.h b/include/linux/mount.h
index cab2a85..978fb10 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -112,4 +112,6 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name);

+extern int relatime_interval;
+
#endif /* _LINUX_MOUNT_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9d048fa..f085ad6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,6 +29,7 @@
#include <linux/utsname.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
+#include <linux/mount.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kobject.h>
@@ -1334,6 +1335,14 @@ static struct ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "relatime_interval",
+ .data = &relatime_interval,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{
.ctl_name = CTL_UNNUMBERED,

--
Matthew Garrett | [email protected]

2008-11-27 17:04:19

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Thu, Nov 27, 2008 at 03:03:41PM +0000, Matthew Garrett wrote:
> Add support for defaulting to relatime
>
> Allow the kernel to enable relatime on all mounts by default. This can be
> configured at build time or by a kernel parameter or sysctl. Also add a
> MS_NORELATIME mount option to allow the default to be overridden for specific
> mount points.

NACK. Please just do it in fstab.

2008-11-27 17:06:42

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v3] relatime: Make relatime smarter

On Thu, Nov 27, 2008 at 04:59:29PM +0000, Matthew Garrett wrote:
> Make relatime smarter
>
> Allow atime to be updated once per day even with relatime. This lets
> utilities like tmpreaper (which delete files based on last access time)
> continue working. The time between atime updates can be configured at boot
> with the relatime_interval kernel argument, or at runtime through /proc

Technically it's sysctl which just happens to be exposed in /proc..

> + if (mnt->mnt_flags & MNT_RELATIME)
> + if (!relatime_need_update(inode, now))
> + goto out;
> if (timespec_equal(&inode->i_atime, &now))

Maybe rename relatime_need_update to atime_need_update and factor
this check into it?

Except for this nitpicks this seems extremly useful

2008-11-27 17:39:22

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Thu, Nov 27, 2008 at 05:30:45PM +0000, P?draig Brady wrote:
> Karel Zak wrote:
> > On Thu, Nov 27, 2008 at 03:03:41PM +0000, Matthew Garrett wrote:
> >> Also add a MS_NORELATIME mount option
> > [...]
> >> +#define MS_NORELATIME (1<<24) /* Disable relatime even if the default */
> >
> > CC: [email protected]
>
> That's useful. Without this, to disable relatime you needed to:
>
> echo 0 > /proc/sys/fs/default_relatime
> mount -o remount,atime /mnt/point/

I'm dropping that hunk - it's easier to default to relatime in
userspace, so there's no need to have a kernel fs parameter to forcibly
disable it.

--
Matthew Garrett | [email protected]

2008-11-27 17:39:38

by Pádraig Brady

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

Karel Zak wrote:
> On Thu, Nov 27, 2008 at 03:03:41PM +0000, Matthew Garrett wrote:
>> Also add a MS_NORELATIME mount option
> [...]
>> +#define MS_NORELATIME (1<<24) /* Disable relatime even if the default */
>
> CC: [email protected]

That's useful. Without this, to disable relatime you needed to:

echo 0 > /proc/sys/fs/default_relatime
mount -o remount,atime /mnt/point/

2008-11-27 17:58:33

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH v4] relatime: Make relatime smarter

Make relatime smarter

Allow atime to be updated once per day even with relatime. This lets
utilities like tmpreaper (which delete files based on last access time)
continue working. The time between atime updates can be configured at boot
with the relatime_interval kernel argument, or at runtime through a sysctl.

Signed-off-by: Matthew Garrett <[email protected]>

---

Adds Christoph's suggestions.

Documentation/kernel-parameters.txt | 4 ++
fs/inode.c | 63 ++++++++++++++++++++++++++++++-----
include/linux/mount.h | 2 +
kernel/sysctl.c | 9 +++++
4 files changed, 69 insertions(+), 9 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d..6d0dc0a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1847,6 +1847,10 @@ and is between 256 and 4096 characters. It is defined in the file
[KNL, SMP] Set scheduler's default relax_domain_level.
See Documentation/cpusets.txt.

+ relatime_interval=
+ [FS] relative atime update frequency, in seconds.
+ (default: 1 day: 86400 seconds)
+
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area

reservetop= [X86-32]
diff --git a/fs/inode.c b/fs/inode.c
index 0487ddb..4899063 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1179,6 +1179,56 @@ sector_t bmap(struct inode * inode, sector_t block)
}
EXPORT_SYMBOL(bmap);

+/*
+ * Relative atime updates frequency (default: 1 day):
+ */
+int relatime_interval __read_mostly = 24*60*60;
+
+/*
+ * Allow overriding the default relatime value on the kernel command line
+ */
+static int __init set_relatime_interval(char *str)
+{
+ get_option(&str, &relatime_interval);
+
+ return 1;
+}
+__setup("relatime_interval=", set_relatime_interval);
+
+/*
+ * With relative atime, only update atime if the
+ * previous atime is earlier than either the ctime or
+ * mtime.
+ */
+static int atime_need_update(struct vfsmount *mnt, struct inode *inode,
+ struct timespec now)
+{
+
+ if (!(mnt->mnt_flags & MNT_RELATIME))
+ return 1;
+ /*
+ * Is mtime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
+ return 1;
+ /*
+ * Is ctime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
+ return 1;
+
+ /*
+ * Is the previous atime value older than the update interval?
+ * If yes, update atime:
+ */
+ if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
+ return 1;
+ /*
+ * Good, we can skip the atime update:
+ */
+ return 0;
+}
+
/**
* touch_atime - update the access time
* @mnt: mount the inode is accessed on
@@ -1206,17 +1256,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
goto out;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
goto out;
- if (mnt->mnt_flags & MNT_RELATIME) {
- /*
- * With relative atime, only update atime if the previous
- * atime is earlier than either the ctime or mtime.
- */
- if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
- timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
- goto out;
- }

now = current_fs_time(inode->i_sb);
+
+ if (!atime_need_update(mnt, inode, now))
+ goto out;
+
if (timespec_equal(&inode->i_atime, &now))
goto out;

diff --git a/include/linux/mount.h b/include/linux/mount.h
index cab2a85..978fb10 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -112,4 +112,6 @@ extern void mark_mounts_for_expiry(struct list_head *mounts);
extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name);

+extern int relatime_interval;
+
#endif /* _LINUX_MOUNT_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9d048fa..f085ad6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,6 +29,7 @@
#include <linux/utsname.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
+#include <linux/mount.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kobject.h>
@@ -1334,6 +1335,14 @@ static struct ctl_table fs_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "relatime_interval",
+ .data = &relatime_interval,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
{
.ctl_name = CTL_UNNUMBERED,

--
Matthew Garrett | [email protected]

2008-11-27 19:18:59

by Alan

[permalink] [raw]
Subject: Re: [PATCH v3] relatime: Make relatime smarter

> + relatime_interval=
> + [FS] relative atime update frequency, in seconds.
> + (default: 1 day: 86400 seconds)

What about leap seconds ;)

Acked-by: Alan Cox <[email protected]>

2008-11-27 22:09:01

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Nov 27, 2008 17:58 +0000, Matthew Garrett wrote:
> + relatime_interval=
> + [FS] relative atime update frequency, in seconds.
> + (default: 1 day: 86400 seconds)

The one problem with a 1-day default is that cron jobs like updatedb will
revert to updating the atime on every single file every day. It would be
better to make it slightly more than 1 day (e.g. 25h) to avoid this and
at least defer atime updates to every other day for files that are not
otherwise accessed except by cron.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

2008-11-27 22:35:43

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Thu, Nov 27, 2008 at 03:08:39PM -0700, Andreas Dilger wrote:
> On Nov 27, 2008 17:58 +0000, Matthew Garrett wrote:
> > + relatime_interval=
> > + [FS] relative atime update frequency, in seconds.
> > + (default: 1 day: 86400 seconds)
>
> The one problem with a 1-day default is that cron jobs like updatedb will
> revert to updating the atime on every single file every day. It would be
> better to make it slightly more than 1 day (e.g. 25h) to avoid this and
> at least defer atime updates to every other day for files that are not
> otherwise accessed except by cron.

Doesn't updatedb only access directories, not files? I don't think
relatime implies nodiratime, but certainly the two could both be
specified, and that would fix one of the updatedb problems. Are there
any other common cronjobs you're concerned about?

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-11-28 11:14:16

by Jamie Lokier

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

Andreas Dilger wrote:
> The one problem with a 1-day default is that cron jobs like updatedb will
> revert to updating the atime on every single file every day. It would be
> better to make it slightly more than 1 day (e.g. 25h) to avoid this and
> at least defer atime updates to every other day for files that are not
> otherwise accessed except by cron.

On my computers (laptops) updatedb doesn't run at exact 24h intervals
- that would only happen for computers powered up all the time.

-- Jamie

2008-11-28 11:16:47

by Jamie Lokier

[permalink] [raw]
Subject: Re: [PATCH v3] relatime: Make relatime smarter

Alan Cox wrote:
> > + relatime_interval=
> > + [FS] relative atime update frequency, in seconds.
> > + (default: 1 day: 86400 seconds)
>
> What about leap seconds ;)

More generally - is the relatime_interval in "monotonic" seconds, or
in gettimeofday seconds which are changed by clock updates?

-- Jamie

2008-11-28 11:18:27

by Jamie Lokier

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

Matthew Garrett wrote:
> The time between atime updates can be configured at boot
> with the relatime_interval kernel argument, or at runtime through a sysctl.

Shouldn't it be a per-mount value, with defaults coming from the sysctl?

-- Jamie

2008-11-28 13:41:24

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Fri, Nov 28, 2008 at 11:18:09AM +0000, Jamie Lokier wrote:
> Matthew Garrett wrote:
> > The time between atime updates can be configured at boot
> > with the relatime_interval kernel argument, or at runtime through a sysctl.
>
> Shouldn't it be a per-mount value, with defaults coming from the sysctl?

Perhaps a more sensible question would be "Why make it configurable at
all?" What's wrong with hardcoding 24 hours? Or, to put it another
way, who wants to change it from 24 hours, and why?

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-11-28 13:41:46

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Thu, Nov 27, 2008 at 03:08:39PM -0700, Andreas Dilger wrote:

> The one problem with a 1-day default is that cron jobs like updatedb will
> revert to updating the atime on every single file every day. It would be
> better to make it slightly more than 1 day (e.g. 25h) to avoid this and
> at least defer atime updates to every other day for files that are not
> otherwise accessed except by cron.

I don't see the real benefit to this. If you want to prevent atime
updates entirely, use noatime rather than relatime. Increasing the
timeout just means that you get increased disk activity every other day
rather than every day, which isn't really the problem we're trying to
solve.

--
Matthew Garrett | [email protected]

2008-11-28 13:45:46

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3] relatime: Make relatime smarter

On Fri, Nov 28, 2008 at 11:16:30AM +0000, Jamie Lokier wrote:
> Alan Cox wrote:
> > > + relatime_interval=
> > > + [FS] relative atime update frequency, in seconds.
> > > + (default: 1 day: 86400 seconds)
> >
> > What about leap seconds ;)
>
> More generally - is the relatime_interval in "monotonic" seconds, or
> in gettimeofday seconds which are changed by clock updates?

If this is actually a problem people in the real world are worried
about, I think there's been a fundamental failure in the human race.

--
Matthew Garrett | [email protected]

2008-11-28 13:47:33

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Fri, Nov 28, 2008 at 06:40:55AM -0700, Matthew Wilcox wrote:
> On Fri, Nov 28, 2008 at 11:18:09AM +0000, Jamie Lokier wrote:
> > Matthew Garrett wrote:
> > > The time between atime updates can be configured at boot
> > > with the relatime_interval kernel argument, or at runtime through a sysctl.
> >
> > Shouldn't it be a per-mount value, with defaults coming from the sysctl?
>
> Perhaps a more sensible question would be "Why make it configurable at
> all?" What's wrong with hardcoding 24 hours? Or, to put it another
> way, who wants to change it from 24 hours, and why?

There's approximately no cost to it, and arguably use cases that would
benefit. I don't think they'd be common enough to benefit from the
additional complexity of making it per-mount.

--
Matthew Garrett | [email protected]

2008-11-29 08:24:59

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Thu, 27 Nov 2008 12:03:46 -0500 Christoph Hellwig <[email protected]> wrote:

> On Thu, Nov 27, 2008 at 03:03:41PM +0000, Matthew Garrett wrote:
> > Add support for defaulting to relatime
> >
> > Allow the kernel to enable relatime on all mounts by default. This can be
> > configured at build time or by a kernel parameter or sysctl. Also add a
> > MS_NORELATIME mount option to allow the default to be overridden for specific
> > mount points.
>
> NACK. Please just do it in fstab.
>

Yes, that's what I was wondering. No /proc thingy, no new Kconfig
entries, no __setup() thing. Just

mount -o relatime=$((24*60*60)) /dev/sda1 /mnt/point
mount -o remount,relatime=$((24*60*60)) /dev/sda1 /mnt/point

?

2008-11-29 08:29:39

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 1/2] relatime: Make atime updates more useful

On Wed, 26 Nov 2008 19:54:57 +0000 Matthew Garrett <[email protected]> wrote:

> Allow atime to be updated once per day even with relatime enabled. This
> lets utilities like tmpreaper (which deletes files based on last access
> time) continue working.
>
> Signed-off-by: Matthew Garrett <[email protected]>
>
> ---
>
> Updated version of Ingo's patch from last year - this section is
> identical.
>
> commit 2c145e187600ca961715fa82ae3ae7919d744bc9
> Author: Matthew Garrett <[email protected]>
> Date: Wed Nov 26 17:44:07 2008 +0000
>
> Make relatime smarter
>
> Allow atime to be updated once per day even with relatime. This lets
> utilities like tmpreaper (which delete files based on last access time)
> continue working.
>

Two changelogs always sends me into a panic. It's easier when they are
identical ;)

> index 0487ddb..348fa16 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -1179,6 +1179,41 @@ sector_t bmap(struct inode * inode, sector_t block)
> }
> EXPORT_SYMBOL(bmap);
>
> +/*
> + * Relative atime updates frequency (default: 1 day):
> + */
> +int relatime_interval __read_mostly = 24*60*60;

I assume that it's global for the benefit of the second patch.

Yes, we do put a lot of extern-decls-in-C over in sysctl.c. But that
doesn't make it good. It would be better to add the declaration to a
header which is visible to all sites which use the symbol.

We should perhaps have a standalone sysctl-definitions.h for this
purpose, so we don't end up having to #include <everything> in
sysctl.c.

> +/*
> + * With relative atime, only update atime if the
> + * previous atime is earlier than either the ctime or
> + * mtime.
> + */
> +static int relatime_need_update(struct inode *inode, struct timespec now)
> +{
> + /*
> + * Is mtime younger than atime? If yes, update atime:
> + */
> + if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
> + return 1;
> + /*
> + * Is ctime younger than atime? If yes, update atime:
> + */
> + if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
> + return 1;
> +
> + /*
> + * Is the previous atime value older than the update interval?
> + * If yes, update atime:
> + */
> + if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= relatime_interval)
> + return 1;

I dunno what type those tv_secs have, but the whole thing is cast to a
long and is then signed-compared with an integer.

Is this correct and intended? I guess it is, but.. just checking?

> + /*
> + * Good, we can skip the atime update:
> + */
> + return 0;
> +}
> +
> /**
> * touch_atime - update the access time
> * @mnt: mount the inode is accessed on
> @@ -1206,17 +1241,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
> goto out;
> if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
> goto out;
> - if (mnt->mnt_flags & MNT_RELATIME) {
> - /*
> - * With relative atime, only update atime if the previous
> - * atime is earlier than either the ctime or mtime.
> - */
> - if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
> - timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
> - goto out;
> - }
>
> now = current_fs_time(inode->i_sb);
> +
> + if (mnt->mnt_flags & MNT_RELATIME)
> + if (!relatime_need_update(inode, now))
> + goto out;
> if (timespec_equal(&inode->i_atime, &now))
> goto out;

2008-11-29 13:03:35

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, Nov 29, 2008 at 12:24:19AM -0800, Andrew Morton wrote:
> Yes, that's what I was wondering. No /proc thingy, no new Kconfig
> entries, no __setup() thing. Just
>
> mount -o relatime=$((24*60*60)) /dev/sda1 /mnt/point
> mount -o remount,relatime=$((24*60*60)) /dev/sda1 /mnt/point

That would imply that relatime could be different per-mountpoint.

I favour not making it configurable at all.

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-11-29 13:58:51

by Jörn Engel

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour


On Sat, 29 November 2008 06:03:08 -0700, Matthew Wilcox wrote:
>
> That would imply that relatime could be different per-mountpoint.
>
> I favour not making it configurable at all.

I guess some amount if configuration may be necessary. If you go back
to the beginning of the thread...

On Wed, 26 November 2008 19:54:57 +0000, Matthew Garrett wrote:
>
> Allow atime to be updated once per day even with relatime enabled. This
> lets utilities like tmpreaper (which deletes files based on last access
> time) continue working.

...and check the tmpreaper manpage, you will notice that tmpreaper can
be configured as well. So relatime has a default timeout of T and
tmpreaper is configured to delete files after 1/2 T (never mind what T
might be), the system breaks. Guessing a value of T that is good enough
for everyone is a complicated business, so one configurable makes sense
imo.

One per mountpoint is rather silly, of course.

Jörn

--
Mundie uses a textbook tactic of manipulation: start with some
reasonable talk, and lead the audience to an unreasonable conclusion.
-- Bruce Perens

2008-11-29 18:57:20

by Jamie Lokier

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

J?rn Engel wrote:
> ...and check the tmpreaper manpage, you will notice that tmpreaper can
> be configured as well. So relatime has a default timeout of T and
> tmpreaper is configured to delete files after 1/2 T (never mind what T
> might be), the system breaks. Guessing a value of T that is good enough
> for everyone is a complicated business, so one configurable makes sense
> imo.
>
> One per mountpoint is rather silly, of course.

If it's configurable at all for tmpreaper (or similar), it should work
the same for tmpreaper in virtual machine containers. (Same as,
e.g. utsname is different in containers). If not now, someone will
have to patch it later. Each VM runs it's own tmpreaper, configured
usually by separate people.

It's probably simpler to make it per-mountpoint than a virtualised global.

I don't see why there is an objection to per-mountpoint.
Andrew Morton's syntax: mount /dev/foo /mnt/bar -o relatime=86400
looks natural to me.

-- Jamie

2008-11-29 19:03:27

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, Nov 29, 2008 at 06:56:45PM +0000, Jamie Lokier wrote:

> I don't see why there is an objection to per-mountpoint.
> Andrew Morton's syntax: mount /dev/foo /mnt/bar -o relatime=86400
> looks natural to me.

If somebody feels that this functionality would be useful, they're
welcome to write it. A global default doesn't preclude per-mountpoint
settings. This patch makes the existing kernel code more useful and so
is worthwhile on its own, even if it doesn't scratch everyone's itch.

--
Matthew Garrett | [email protected]

2008-11-29 20:33:20

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, 29 Nov 2008 19:02:45 +0000 Matthew Garrett <[email protected]> wrote:

> On Sat, Nov 29, 2008 at 06:56:45PM +0000, Jamie Lokier wrote:
>
> > I don't see why there is an objection to per-mountpoint.
> > Andrew Morton's syntax: mount /dev/foo /mnt/bar -o relatime=86400
> > looks natural to me.
>
> If somebody feels that this functionality would be useful, they're
> welcome to write it.

If someone writes it, I'll merge it.

> A global default doesn't preclude per-mountpoint
> settings. This patch makes the existing kernel code more useful and so
> is worthwhile on its own, even if it doesn't scratch everyone's itch.

The standard, usual, expected way of modifying a filesystem's behaviour
is via mount options. This is also quite flexible.

Is there some extraordinary reason why the standard interface is not to
be used here?

2008-11-29 20:39:18

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, Nov 29, 2008 at 12:32:20PM -0800, Andrew Morton wrote:
> The standard, usual, expected way of modifying a filesystem's behaviour
> is via mount options. This is also quite flexible.
>
> Is there some extraordinary reason why the standard interface is not to
> be used here?

Because it would have to be managed (and consulted) per ... what?
vfsmount? superblock? This is featuritis gone MAD.

I'll take my bikeshed in teal, stippled with cornsilk.

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-11-29 20:55:22

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, 29 Nov 2008 12:32:20 -0800
Andrew Morton <[email protected]> wrote:

>
> The standard, usual, expected way of modifying a filesystem's
> behaviour is via mount options. This is also quite flexible.
>
> Is there some extraordinary reason why the standard interface is not
> to be used here?


let me ask this:
Has anmyone ever had the desire to change the default of 1 day of
relatime? Ever?
Maybe this code isn't really needed if nobody even thought about
changing it.

Clearly there are two extremes (always and never) for which we have
atime/noatime. I'm not sure we need to have any smarts in the middle
point for the user to change. If this is something people wish to see
tuned better, I would rather spend the code size in trying to get it
autotuning.

--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org

2008-11-29 20:56:51

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, 29 Nov 2008 13:38:57 -0700 Matthew Wilcox <[email protected]> wrote:

> On Sat, Nov 29, 2008 at 12:32:20PM -0800, Andrew Morton wrote:
> > The standard, usual, expected way of modifying a filesystem's behaviour
> > is via mount options. This is also quite flexible.
> >
> > Is there some extraordinary reason why the standard interface is not to
> > be used here?
>
> Because it would have to be managed (and consulted) per ... what?
> vfsmount? superblock?

Per superblock, of course.

> This is featuritis gone MAD.

No it isn't - it's the expected and standard behaviour. We have all
the kernel infrastructure and userspace tools in place for doing it
this way.

Modifying the behaviour of all filesystems with a single knob is a
weird thing to do.

MNT_RELATIME itself is already per-superblock.

2008-11-29 21:02:29

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, Nov 29, 2008 at 12:32:20PM -0800, Andrew Morton wrote:
> On Sat, 29 Nov 2008 19:02:45 +0000 Matthew Garrett <[email protected]> wrote:
> > A global default doesn't preclude per-mountpoint
> > settings. This patch makes the existing kernel code more useful and so
> > is worthwhile on its own, even if it doesn't scratch everyone's itch.
>
> The standard, usual, expected way of modifying a filesystem's behaviour
> is via mount options. This is also quite flexible.

Yes, if something is configured at a per-filesystem level, a mount
option makes sense. I don't personally see any terribly sensible use
cases for having this be per-filesystem and so wasn't planning on
implementing that.

--
Matthew Garrett | [email protected]

2008-11-29 21:03:21

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour

On Sat, Nov 29, 2008 at 12:55:29PM -0800, Arjan van de Ven wrote:

> let me ask this:
> Has anmyone ever had the desire to change the default of 1 day of
> relatime? Ever?

The current kernel code has no time-based heuristics. It'll only update
atime if it's older than ctime or mtime.

--
Matthew Garrett | [email protected]

2008-11-29 21:42:18

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] relatime: Allow making relatime the default behaviour


* Matthew Wilcox <[email protected]> wrote:

> On Sat, Nov 29, 2008 at 12:32:20PM -0800, Andrew Morton wrote:
> > The standard, usual, expected way of modifying a filesystem's behaviour
> > is via mount options. This is also quite flexible.
> >
> > Is there some extraordinary reason why the standard interface is not to
> > be used here?
>
> Because it would have to be managed (and consulted) per ... what?
> vfsmount? superblock? This is featuritis gone MAD.
>
> I'll take my bikeshed in teal, stippled with cornsilk.

agreed.

Meanwhile, 10 years and counting, the Linux kernel still generates a
stupid write IO for every file read that apps do. Fortunately hardware
designers will get rid of rotating disks faster than we can fix our
glaring process problems in this space - but it's still a bit sad.

Ingo

2008-12-02 11:11:00

by Karel Zak

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Fri, Nov 28, 2008 at 06:40:55AM -0700, Matthew Wilcox wrote:
> On Fri, Nov 28, 2008 at 11:18:09AM +0000, Jamie Lokier wrote:
> > Matthew Garrett wrote:
> > > The time between atime updates can be configured at boot
> > > with the relatime_interval kernel argument, or at runtime through a sysctl.
> >
> > Shouldn't it be a per-mount value, with defaults coming from the sysctl?
>
> Perhaps a more sensible question would be "Why make it configurable at

this is GNOME-mentality :-)

> all?" What's wrong with hardcoding 24 hours? Or, to put it another
> way, who wants to change it from 24 hours, and why?

Why do you think that 24 hours is the right default value? Do you
have any logical argument for this setting?

Karel

--
Karel Zak <[email protected]>

2008-12-02 16:47:01

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v4] relatime: Make relatime smarter

On Tue, Dec 02, 2008 at 12:10:25PM +0100, Karel Zak wrote:
> On Fri, Nov 28, 2008 at 06:40:55AM -0700, Matthew Wilcox wrote:
> > On Fri, Nov 28, 2008 at 11:18:09AM +0000, Jamie Lokier wrote:
> > > Matthew Garrett wrote:
> > > > The time between atime updates can be configured at boot
> > > > with the relatime_interval kernel argument, or at runtime through a sysctl.
> > >
> > > Shouldn't it be a per-mount value, with defaults coming from the sysctl?
> >
> > Perhaps a more sensible question would be "Why make it configurable at
>
> this is GNOME-mentality :-)

Yes, I frequently pal around with terrorists.

> > all?" What's wrong with hardcoding 24 hours? Or, to put it another
> > way, who wants to change it from 24 hours, and why?
>
> Why do you think that 24 hours is the right default value? Do you
> have any logical argument for this setting?

Once a day seems like a good value to me. It's a good human being
timescale and still cuts down the number of atime updates by a lot.

If somebody really cares, they could graph the relatime_update value
against number of writes performed in a given period and determine a
better cutoff. I can think of a hundred better ways to spend my time
though.

Good job of not answering the question, by the way. Why _not_ 24 hours?

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-12-02 17:19:42

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH] relatime: Let relatime update atime at least once per day

Allow atime to be updated once per day even with relatime. This lets
utilities like tmpreaper (which delete files based on last access time)
continue working.

Signed-off-by: Matthew Garrett <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: Alan Cox <[email protected]>

---

I've removed the adjustable time code, since nobody's come up with a
terribly good use case for it. This makes relatime more useful in the
generic case - there may be situations where it still doesn't satisfy
people, but that's not a regression over the current situation.

diff --git a/fs/inode.c b/fs/inode.c
index 0487ddb..057c92b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1179,6 +1179,40 @@ sector_t bmap(struct inode * inode, sector_t block)
}
EXPORT_SYMBOL(bmap);

+/*
+ * With relative atime, only update atime if the previous atime is
+ * earlier than either the ctime or mtime or if at least a day has
+ * passed since the last atime update.
+ */
+static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
+ struct timespec now)
+{
+
+ if (!(mnt->mnt_flags & MNT_RELATIME))
+ return 1;
+ /*
+ * Is mtime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
+ return 1;
+ /*
+ * Is ctime younger than atime? If yes, update atime:
+ */
+ if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
+ return 1;
+
+ /*
+ * Is the previous atime value older than a day? If yes,
+ * update atime:
+ */
+ if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= 24*60*60)
+ return 1;
+ /*
+ * Good, we can skip the atime update:
+ */
+ return 0;
+}
+
/**
* touch_atime - update the access time
* @mnt: mount the inode is accessed on
@@ -1206,17 +1240,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
goto out;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
goto out;
- if (mnt->mnt_flags & MNT_RELATIME) {
- /*
- * With relative atime, only update atime if the previous
- * atime is earlier than either the ctime or mtime.
- */
- if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
- timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
- goto out;
- }

now = current_fs_time(inode->i_sb);
+
+ if (!relatime_need_update(mnt, inode, now))
+ goto out;
+
if (timespec_equal(&inode->i_atime, &now))
goto out;

--
Matthew Garrett | [email protected]

2008-12-13 05:26:34

by Valerie Aurora

[permalink] [raw]
Subject: Re: [PATCH] relatime: Let relatime update atime at least once per day

On Tue, Dec 02, 2008 at 05:19:26PM +0000, Matthew Garrett wrote:
> Allow atime to be updated once per day even with relatime. This lets
> utilities like tmpreaper (which delete files based on last access time)
> continue working.
>
> Signed-off-by: Matthew Garrett <[email protected]>
> Acked-by: Ingo Molnar <[email protected]>
> Acked-by: Alan Cox <[email protected]>

My name is Valerie Aurora Henson, and I endorse this patch.

Acked-by: Valerie Aurora Henson <[email protected]>

-VAL

> ---
>
> I've removed the adjustable time code, since nobody's come up with a
> terribly good use case for it. This makes relatime more useful in the
> generic case - there may be situations where it still doesn't satisfy
> people, but that's not a regression over the current situation.
>
> diff --git a/fs/inode.c b/fs/inode.c
> index 0487ddb..057c92b 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -1179,6 +1179,40 @@ sector_t bmap(struct inode * inode, sector_t block)
> }
> EXPORT_SYMBOL(bmap);
>
> +/*
> + * With relative atime, only update atime if the previous atime is
> + * earlier than either the ctime or mtime or if at least a day has
> + * passed since the last atime update.
> + */
> +static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
> + struct timespec now)
> +{
> +
> + if (!(mnt->mnt_flags & MNT_RELATIME))
> + return 1;
> + /*
> + * Is mtime younger than atime? If yes, update atime:
> + */
> + if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0)
> + return 1;
> + /*
> + * Is ctime younger than atime? If yes, update atime:
> + */
> + if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0)
> + return 1;
> +
> + /*
> + * Is the previous atime value older than a day? If yes,
> + * update atime:
> + */
> + if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= 24*60*60)
> + return 1;
> + /*
> + * Good, we can skip the atime update:
> + */
> + return 0;
> +}
> +
> /**
> * touch_atime - update the access time
> * @mnt: mount the inode is accessed on
> @@ -1206,17 +1240,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
> goto out;
> if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
> goto out;
> - if (mnt->mnt_flags & MNT_RELATIME) {
> - /*
> - * With relative atime, only update atime if the previous
> - * atime is earlier than either the ctime or mtime.
> - */
> - if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 &&
> - timespec_compare(&inode->i_ctime, &inode->i_atime) < 0)
> - goto out;
> - }
>
> now = current_fs_time(inode->i_sb);
> +
> + if (!relatime_need_update(mnt, inode, now))
> + goto out;
> +
> if (timespec_equal(&inode->i_atime, &now))
> goto out;
>
> --
> Matthew Garrett | [email protected]
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html