Merge pull request #349 from imjfckm/optimize-nhit-hash

Reorder fields in nhit_hash map to improve memory efficiency
This commit is contained in:
Robert Baldyga
2020-03-09 20:23:32 +01:00
committed by GitHub

View File

@@ -86,15 +86,13 @@
#define HASH_PRIME 4099 #define HASH_PRIME 4099
struct nhit_list_elem { struct nhit_list_elem {
ocf_core_id_t core_id; /* Fields are ordered for memory efficiency, not for looks. */
uint64_t core_lba; uint64_t core_lba;
env_atomic counter;
ocf_cache_line_t coll_prev; ocf_cache_line_t coll_prev;
ocf_cache_line_t coll_next; ocf_cache_line_t coll_next;
ocf_core_id_t core_id;
bool valid; bool valid;
env_atomic counter;
}; };
struct nhit_hash { struct nhit_hash {