From c8d36e21923359b6b22dc1eb9ce77115f0342e17 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 5 Jan 2023 12:31:55 -0500 Subject: [PATCH] Pack zrlock_t by 8 bytes On FreeBSD this reduces this structure size from 64 to 56 bytes. dnode_handle_t respectively reduces from 72 to 64 bytes. It sounds like a waste to need 72 bytes to be able to relocate 808 bytes of dnode_t, which relocation on FreeBSD is not even supported. Reviewed-by: Ryan Moeller Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: Alexander Motin Sponsored by: iXsystems, Inc. Closes #14317 --- include/sys/zrlock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/sys/zrlock.h b/include/sys/zrlock.h index b6eba1a18f..c8c656dc55 100644 --- a/include/sys/zrlock.h +++ b/include/sys/zrlock.h @@ -34,9 +34,8 @@ extern "C" { typedef struct zrlock { kmutex_t zr_mtx; - volatile int32_t zr_refcount; kcondvar_t zr_cv; - uint16_t zr_pad; + volatile int32_t zr_refcount; #ifdef ZFS_DEBUG kthread_t *zr_owner; const char *zr_caller;