Skip to content

Commit 12f362c

Browse files
committed
MDEV-18233 Moving the hash_node_t to improve locality of reference
2 parents e0633f2 + a06a3e4 commit 12f362c

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

storage/innobase/include/buf0buf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ struct buf_page_t{
14431443
by buf_pool->mutex. */
14441444
ib_uint32_t offset; /*!< page number; also protected
14451445
by buf_pool->mutex. */
1446+
buf_page_t* hash; /*!< node used in chaining to
1447+
buf_pool->page_hash or
1448+
buf_pool->zip_hash */
14461449
/** count of how manyfold this block is currently bufferfixed */
14471450
#ifdef PAGE_ATOMIC_REF_COUNT
14481451
ib_uint32_t buf_fix_count;
@@ -1489,9 +1492,6 @@ struct buf_page_t{
14891492
zip.data == NULL means an active
14901493
buf_pool->watch */
14911494
#ifndef UNIV_HOTBACKUP
1492-
buf_page_t* hash; /*!< node used in chaining to
1493-
buf_pool->page_hash or
1494-
buf_pool->zip_hash */
14951495
#ifdef UNIV_DEBUG
14961496
ibool in_page_hash; /*!< TRUE if in buf_pool->page_hash */
14971497
ibool in_zip_hash; /*!< TRUE if in buf_pool->zip_hash */

storage/innobase/include/dict0mem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,10 @@ struct dict_table_t{
926926

927927

928928
table_id_t id; /*!< id of the table */
929+
hash_node_t id_hash; /*!< hash chain node */
929930
mem_heap_t* heap; /*!< memory heap */
930931
char* name; /*!< table name */
932+
hash_node_t name_hash; /*!< hash chain node */
931933
const char* dir_path_of_temp_table;/*!< NULL or the directory path
932934
where a TEMPORARY table that was explicitly
933935
created by a user should be placed if
@@ -983,8 +985,6 @@ struct dict_table_t{
983985
dictionary information and
984986
MySQL FRM information mismatch. */
985987
#ifndef UNIV_HOTBACKUP
986-
hash_node_t name_hash; /*!< hash chain node */
987-
hash_node_t id_hash; /*!< hash chain node */
988988
UT_LIST_BASE_NODE_T(dict_index_t)
989989
indexes; /*!< list of indexes of the table */
990990

storage/innobase/include/fil0fil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ struct fil_node_t {
245245
struct fil_space_t {
246246
char* name; /*!< space name = the path to the first file in
247247
it */
248+
hash_node_t name_hash;/*!< hash chain the name_hash table */
248249
ulint id; /*!< space id */
250+
hash_node_t hash; /*!< hash chain node */
249251
ib_int64_t tablespace_version;
250252
/*!< in DISCARD/IMPORT this timestamp
251253
is used to check if we should ignore
@@ -292,8 +294,6 @@ struct fil_space_t {
292294
trying to read a block.
293295
Dropping of the tablespace is forbidden
294296
if this is positive */
295-
hash_node_t hash; /*!< hash chain node */
296-
hash_node_t name_hash;/*!< hash chain the name_hash table */
297297
#ifndef UNIV_HOTBACKUP
298298
rw_lock_t latch; /*!< latch protecting the file space storage
299299
allocation */

storage/xtradb/include/buf0buf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,9 @@ struct buf_page_t{
14771477

14781478
ib_uint32_t space; /*!< tablespace id. */
14791479
ib_uint32_t offset; /*!< page number. */
1480+
buf_page_t* hash; /*!< node used in chaining to
1481+
buf_pool->page_hash or
1482+
buf_pool->zip_hash */
14801483
/** count of how manyfold this block is currently bufferfixed */
14811484
#ifdef PAGE_ATOMIC_REF_COUNT
14821485
ib_uint32_t buf_fix_count;
@@ -1530,9 +1533,6 @@ struct buf_page_t{
15301533
zip.data == NULL means an active
15311534
buf_pool->watch */
15321535
#ifndef UNIV_HOTBACKUP
1533-
buf_page_t* hash; /*!< node used in chaining to
1534-
buf_pool->page_hash or
1535-
buf_pool->zip_hash */
15361536
#ifdef UNIV_DEBUG
15371537
ibool in_page_hash; /*!< TRUE if in buf_pool->page_hash */
15381538
ibool in_zip_hash; /*!< TRUE if in buf_pool->zip_hash */

storage/xtradb/include/dict0mem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,10 @@ struct dict_table_t{
937937

938938

939939
table_id_t id; /*!< id of the table */
940+
hash_node_t id_hash; /*!< hash chain node */
940941
mem_heap_t* heap; /*!< memory heap */
941942
char* name; /*!< table name */
943+
hash_node_t name_hash; /*!< hash chain node */
942944
const char* dir_path_of_temp_table;/*!< NULL or the directory path
943945
where a TEMPORARY table that was explicitly
944946
created by a user should be placed if
@@ -994,8 +996,6 @@ struct dict_table_t{
994996
dictionary information and
995997
MySQL FRM information mismatch. */
996998
#ifndef UNIV_HOTBACKUP
997-
hash_node_t name_hash; /*!< hash chain node */
998-
hash_node_t id_hash; /*!< hash chain node */
999999
UT_LIST_BASE_NODE_T(dict_index_t)
10001000
indexes; /*!< list of indexes of the table */
10011001

storage/xtradb/include/fil0fil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ struct fil_node_t {
238238
struct fil_space_t {
239239
char* name; /*!< space name = the path to the first file in
240240
it */
241+
hash_node_t name_hash;/*!< hash chain the name_hash table */
241242
ulint id; /*!< space id */
243+
hash_node_t hash; /*!< hash chain node */
242244
ib_int64_t tablespace_version;
243245
/*!< in DISCARD/IMPORT this timestamp
244246
is used to check if we should ignore
@@ -285,8 +287,6 @@ struct fil_space_t {
285287
trying to read a block.
286288
Dropping of the tablespace is forbidden
287289
if this is positive */
288-
hash_node_t hash; /*!< hash chain node */
289-
hash_node_t name_hash;/*!< hash chain the name_hash table */
290290
#ifndef UNIV_HOTBACKUP
291291
prio_rw_lock_t latch; /*!< latch protecting the file space storage
292292
allocation */

0 commit comments

Comments
 (0)