summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fil0fil.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-01-14 22:14:56 +0300
committerEugene Kosov <claprix@yandex.ru>2019-01-14 22:14:56 +0300
commita06a3e467029cafc3c7f432fff9603fe9030c480 (patch)
treefe64aa0a47b203da18d243e7305b9bf88434b37b /storage/innobase/include/fil0fil.h
parentb4c471099dfd6c94ada59911ada236e6831b5508 (diff)
downloadmariadb-git-a06a3e467029cafc3c7f432fff9603fe9030c480.tar.gz
MDEV-18233 Moving the hash_node_t to improve locality of reference
When performing a hash search via HASH_SEARCH we first look at a key of a node and then at its pointer to the next node in chain. If we have those in one cache line instead of a two we reduce memory reads. I found dict_table_t, fil_space_t and buf_page_t suitable for such improvement.
Diffstat (limited to 'storage/innobase/include/fil0fil.h')
-rw-r--r--storage/innobase/include/fil0fil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 6e772e31772..7c0f623d890 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -245,7 +245,9 @@ struct fil_node_t {
struct fil_space_t {
char* name; /*!< space name = the path to the first file in
it */
+ hash_node_t name_hash;/*!< hash chain the name_hash table */
ulint id; /*!< space id */
+ hash_node_t hash; /*!< hash chain node */
ib_int64_t tablespace_version;
/*!< in DISCARD/IMPORT this timestamp
is used to check if we should ignore
@@ -292,8 +294,6 @@ struct fil_space_t {
trying to read a block.
Dropping of the tablespace is forbidden
if this is positive */
- hash_node_t hash; /*!< hash chain node */
- hash_node_t name_hash;/*!< hash chain the name_hash table */
#ifndef UNIV_HOTBACKUP
rw_lock_t latch; /*!< latch protecting the file space storage
allocation */