Re: [PATCH 02/22] r/o bind mounts: add vfsmount writer counts

Eric Dumazet
2007-02-10T00:02:16Z

Dave Hansen a écrit :

> @@ -56,6 +57,7 @@ struct vfsmount {
> struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
> struct mnt_namespace *mnt_ns; /* containing namespace */
> struct user_namespace *mnt_user_ns; /* namespace for uid interpretation */
> + int mnt_writers; /* nr files open for write */
> /*
> * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
> * to let these frequently modified fields in a separate cache line
> @@ -72,7 +74,26 @@ static inline struct vfsmount *mntget(st
> atomic_inc(&mnt->mnt_count);
> return mnt;

Dave, please read again this comment in struct vfsmount definition.

If I understand your infrastructure, mnt_writers is going to be frequently
modified, so it should be placed at the end of struct vfsmount, in the same
cache line than mnt_count.

Thank you
Eric