Skip to content

Commit

Permalink
Properly pad struct tx_cpu to cache line
Browse files Browse the repository at this point in the history
We already use ____cacheline_aligned in many places, so add one more
instead of seems arbitrary char tc_pad[8].

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes openzfs#15402
  • Loading branch information
amotin authored and lundman committed Dec 11, 2023
1 parent 41a4e1e commit 458c66f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/sys/txg_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ struct tx_cpu {
kcondvar_t tc_cv[TXG_SIZE];
uint64_t tc_count[TXG_SIZE]; /* tx hold count on each txg */
list_t tc_callbacks[TXG_SIZE]; /* commit cb list */
char tc_pad[8]; /* pad to fill 3 cache lines */
};
} ____cacheline_aligned;

/*
* The tx_state structure maintains the state information about the different
Expand Down

0 comments on commit 458c66f

Please sign in to comment.