From b488246b458f8addb67e36a0e25601df9ee9219f Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 19 Sep 2019 21:23:14 +0000 Subject: [PATCH] vfs: group fields used for per-cpu ops in one cacheline Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_mount.c | 2 +- sys/sys/mount.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 494f2a53628..76c483c5640 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -157,7 +157,7 @@ vfs_mount_init(void *dummy __unused) { mount_zone = uma_zcreate("Mountpoints", sizeof(struct mount), NULL, - NULL, mount_init, mount_fini, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, mount_init, mount_fini, UMA_ALIGN_CACHE, UMA_ZONE_NOFREE); } SYSINIT(vfs_mount, SI_SUB_VFS, SI_ORDER_ANY, vfs_mount_init, NULL); diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 4a5333203f9..562fa191fe2 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -226,7 +226,7 @@ struct mount { struct lock mnt_explock; /* vfs_export walkers lock */ TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ - int mnt_vfs_ops; /* (i) pending vfs ops */ + int __aligned(CACHE_LINE_SIZE) mnt_vfs_ops;/* (i) pending vfs ops */ int *mnt_thread_in_ops_pcpu; int *mnt_ref_pcpu; int *mnt_lockref_pcpu;