Skip to content

Commit

Permalink
Pack zrlock_t by 8 bytes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by:  Alexander Motin <[email protected]>
Sponsored by:   iXsystems, Inc.
Closes #14317
  • Loading branch information
amotin authored and behlendorf committed Mar 2, 2023
1 parent edaa250 commit c8d36e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/sys/zrlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c8d36e2

Please sign in to comment.