diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-10-15 17:42:22 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-10-15 17:42:22 +0000 |
commit | 430dc4518d67d17a9a4bb1101914f4b10b62a022 (patch) | |
tree | f6efe356a4c4ed5f14d9257e83a1142b6bcb6876 /sys/kern/vfs_cache.c | |
parent | cd3d0f8c193edabf1a7e9b692c65bcf854e1979b (diff) | |
download | src-430dc4518d67d17a9a4bb1101914f4b10b62a022.tar.gz src-430dc4518d67d17a9a4bb1101914f4b10b62a022.zip |
Notes
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 0880ed26b28b..c53f75ce369f 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -305,17 +305,18 @@ SYSCTL_BOOL(_vfs, OID_AUTO, cache_fast_revlookup, CTLFLAG_RW, static struct mtx __exclusive_cache_line ncneg_shrink_lock; +#define ncneghash 3 +#define numneglists (ncneghash + 1) + struct neglist { struct mtx nl_lock; TAILQ_HEAD(, namecache) nl_list; } __aligned(CACHE_LINE_SIZE); -static struct neglist __read_mostly *neglists; +static struct neglist neglists[numneglists]; static struct neglist ncneg_hot; static u_long numhotneg; -#define ncneghash 3 -#define numneglists (ncneghash + 1) static inline struct neglist * NCP2NEGLIST(struct namecache *ncp) { @@ -2091,8 +2092,6 @@ nchinit(void *dummy __unused) for (i = 0; i < numvnodelocks; i++) mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); - neglists = malloc(sizeof(*neglists) * numneglists, M_VFSCACHE, - M_WAITOK | M_ZERO); for (i = 0; i < numneglists; i++) { mtx_init(&neglists[i].nl_lock, "ncnegl", NULL, MTX_DEF); TAILQ_INIT(&neglists[i].nl_list); |