-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Few improvements related to CPU cache line size and padding:
Bug #79636: CACHE_LINE_SIZE should be 128 on AArch64 Bug #79637: Hard-coded cache line size Bug #79638: Reconcile CACHE_LINE_SIZE with CPU_LEVEL1_DCACHE_LINESIZE Bug #79652: Suspicious padding in srv_conc_t - changed CPU_LEVEL1_DCACHE_LINESIZE to default to 128 bytes on POWER and AArch64 architectures in cases when no value could be detected by CMake using getconf - changed CACHE_LINE_SIZE definition in ut0counter.h to be an alias of CPU_LEVEL1_DCACHE_LINESIZE - changed a number of hard-coded 64-byte cache line size values in the InnoDB code - fixed insufficient padding for srv_conc members in srv0conc.cc Ported to Mariadb by Daniel Black <daniel.black@au.ibm.com> Added s390 cache size of 256 at same time.
- Loading branch information
Showing
12 changed files
with
49 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -674,17 +674,17 @@ struct trx_sys_t{ | |
trx_id_t max_trx_id; /*!< The smallest number not yet | ||
assigned as a transaction id or | ||
transaction number */ | ||
char pad1[64]; /*!< Ensure max_trx_id does not share | ||
char pad1[CACHE_LINE_SIZE]; /*!< Ensure max_trx_id does not share | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
svoj
|
||
cache line with other fields. */ | ||
trx_id_t* descriptors; /*!< Array of trx descriptors */ | ||
ulint descr_n_max; /*!< The current size of the descriptors | ||
array. */ | ||
char pad2[64]; /*!< Ensure static descriptor fields | ||
char pad2[CACHE_LINE_SIZE]; /*!< Ensure static descriptor fields | ||
do not share cache lines with | ||
descr_n_used */ | ||
ulint descr_n_used; /*!< Number of used elements in the | ||
descriptors array. */ | ||
char pad3[64]; /*!< Ensure descriptors do not share | ||
char pad3[CACHE_LINE_SIZE]; /*!< Ensure descriptors do not share | ||
cache line with other fields */ | ||
#ifdef UNIV_DEBUG | ||
trx_id_t rw_max_trx_id; /*!< Max trx id of read-write transactions | ||
|
@@ -694,7 +694,7 @@ struct trx_sys_t{ | |
memory read-write transactions, sorted | ||
on trx id, biggest first. Recovered | ||
transactions are always on this list. */ | ||
char pad4[64]; /*!< Ensure list base nodes do not | ||
char pad4[CACHE_LINE_SIZE]; /*!< Ensure list base nodes do not | ||
share cache line with other fields */ | ||
trx_list_t ro_trx_list; /*!< List of active and committed in | ||
memory read-only transactions, sorted | ||
|
@@ -703,7 +703,7 @@ struct trx_sys_t{ | |
is not necessary. We should exploit | ||
this and increase concurrency during | ||
add/remove. */ | ||
char pad5[64]; /*!< Ensure list base nodes do not | ||
char pad5[CACHE_LINE_SIZE]; /*!< Ensure list base nodes do not | ||
share cache line with other fields */ | ||
trx_list_t mysql_trx_list; /*!< List of transactions created | ||
for MySQL. All transactions on | ||
|
@@ -717,14 +717,14 @@ struct trx_sys_t{ | |
mysql_trx_list may additionally contain | ||
transactions that have not yet been | ||
started in InnoDB. */ | ||
char pad6[64]; /*!< Ensure list base nodes do not | ||
char pad6[CACHE_LINE_SIZE]; /*!< Ensure list base nodes do not | ||
share cache line with other fields */ | ||
trx_list_t trx_serial_list; | ||
/*!< trx->no ordered List of | ||
transactions in either TRX_PREPARED or | ||
TRX_ACTIVE which have already been | ||
assigned a serialization number */ | ||
char pad7[64]; /*!< Ensure list base nodes do not | ||
char pad7[CACHE_LINE_SIZE]; /*!< Ensure list base nodes do not | ||
share cache line with other fields */ | ||
trx_rseg_t* const rseg_array[TRX_SYS_N_RSEGS]; | ||
/*!< Pointer array to rollback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These padding's do not exist on storage/innobase/include/trx0sys.h, should we still add them ?