Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2013 15:54:57 -0700
From:      Alfred Perlstein <alfred@ixsystems.com>
To:        d@delphij.net
Cc:        fs@freebsd.org
Subject:   Re: expand vfsops for compat
Message-ID:  <5217E841.9060504@ixsystems.com>
In-Reply-To: <5217E3AB.8070902@delphij.net>
References:  <5217DF01.4070504@ixsystems.com> <5217E3AB.8070902@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/23/13 3:35 PM, Xin Li wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 08/23/13 15:15, Alfred Perlstein wrote:
>> Index: sys/mount.h
>> ===================================================================
>>
>>
> - --- sys/mount.h	(revision 254717)
>> +++ sys/mount.h	(working copy) @@ -628,6 +628,12 @@
>> vfs_susp_clean_t	*vfs_susp_clean; vfs_notify_lowervp_t
>> *vfs_reclaim_lowervp; vfs_notify_lowervp_t	*vfs_unlink_lowervp; +
>> vfs_mount_t		*vfs_spare1; +	vfs_mount_t		*vfs_spare2; +	vfs_mount_t
>> *vfs_spare3; +	vfs_mount_t		*vfs_spare4; +	vfs_mount_t
>> *vfs_spare5; +	vfs_mount_t		*vfs_spare6; };
> Can this be just vfs_mount_t *vfs_spare[6]?  Also, why 6 slots?  (We
> currently have 17 vfsops, 17+6=23 is a prime number but I don't think
> we really need a prime number here :).
>
> Cheers,
> - -- 
> Xin LI <delphij@delphij.net>    https://www.delphij.net/
> FreeBSD - The Power to Serve!           Live free or die
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.21 (FreeBSD)
>
> iQEcBAEBCgAGBQJSF+OrAAoJEG80Jeu8UPuzJ50H/RRKhE87CQIqtagjc9ZtPx0P
> 20x0gH3Smo3P8iWHr0Z4xGV3Vm+Hz2iua1aJzwQI7WeilHUd+xd7l/nnnLP83Mxh
> l97mbfmXvBPHeJteuYtN5IbL7Z4qSY1IfJGAsIwUqMfSXk5UnSTK8aAM0vLhNPVb
> TfEcR+xshqL3NDaqAPDp62I4F9Yma1heAHMlXO+jXm7Hy4VR9qVqGSLojdUUV6SV
> PEVB0ulm34y0wGs4vRC9X6zQ1ndkKfZhvuJLmBP3U/bHvhE1yhTVNukWCysoOZ6Y
> /RploLdpiOfKMcCy7vLdfiL1gy6Y7CVbOKpJRYleqrRa2AKBBenEfmmovQXgMrM=
> =w0Ub
> -----END PGP SIGNATURE-----

The reason I picked 6 was because the last set of changes to nullfs 
added *3*, so I figure hedging 2x that is a good bet.

Also prime numbers hash better so why not? :)

About using arrays, arrays are slower than direct member access because 
of compiler issues so .. ...if you are still reading this sentence I am 
joking. :)

Sure, I'll switch to an array.


-- 
Alfred Perlstein




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5217E841.9060504>