From 055298ebd73ba4caa0af2422831ecfc227b214c2 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sat, 10 Feb 2007 01:44:48 -0800 Subject: [PATCH] --- yaml --- r: 47502 b: refs/heads/master c: 4ba4d4c0c52201009232fe9e781a281054a24e75 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/mount.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d3553a783611..9bdf2944ac57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0aa5de8590d684274f57647a870851f101bb3543 +refs/heads/master: 4ba4d4c0c52201009232fe9e781a281054a24e75 diff --git a/trunk/include/linux/mount.h b/trunk/include/linux/mount.h index 1b7e178b0d84..dab69afee2fa 100644 --- a/trunk/include/linux/mount.h +++ b/trunk/include/linux/mount.h @@ -43,9 +43,8 @@ struct vfsmount { struct super_block *mnt_sb; /* pointer to superblock */ struct list_head mnt_mounts; /* list of children, anchored here */ struct list_head mnt_child; /* and going through their mnt_child */ - atomic_t mnt_count; int mnt_flags; - int mnt_expiry_mark; /* true if marked for expiry */ + /* 4 bytes hole on 64bits arches */ char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ struct list_head mnt_list; struct list_head mnt_expire; /* link in fs-specific expiry list */ @@ -54,6 +53,13 @@ struct vfsmount { struct list_head mnt_slave; /* slave list entry */ struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ struct mnt_namespace *mnt_ns; /* containing namespace */ + /* + * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount + * to let these frequently modified fields in a separate cache line + * (so that reads of mnt_flags wont ping-pong on SMP machines) + */ + atomic_t mnt_count; + int mnt_expiry_mark; /* true if marked for expiry */ int mnt_pinned; };