Re: [patch 10/10] fs: brlock vfsmount_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nick Piggin <npiggin@xxxxxxxxx> writes:

BTW one way to make the slow path faster would be to start sharing
per cpu locks inside a core on SMT at least. The same cores have the same
caches and sharing cache lines is free. That would cut it in half
on a 2x HT system.

> -
>  static int event;
>  static DEFINE_IDA(mnt_id_ida);
>  static DEFINE_IDA(mnt_group_ida);
> +static DEFINE_SPINLOCK(mnt_id_lock);

Can you add a scope comment to that lock? 

> @@ -623,39 +653,43 @@ static inline void __mntput(struct vfsmo
>  void mntput_no_expire(struct vfsmount *mnt)
>  {
>  repeat:
> -	if (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
> -		if (likely(!mnt->mnt_pinned)) {
> -			spin_unlock(&vfsmount_lock);
> -			__mntput(mnt);
> -			return;
> -		}
> -		atomic_add(mnt->mnt_pinned + 1, &mnt->mnt_count);
> -		mnt->mnt_pinned = 0;
> -		spin_unlock(&vfsmount_lock);
> -		acct_auto_close_mnt(mnt);
> -		goto repeat;
> +	if (atomic_add_unless(&mnt->mnt_count, -1, 1))
> +		return;

Hmm that's a unrelated change?

The rest looks all good and quite straight forward

Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
-Andi
-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux