mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Re-embed multilist_t storage
This commit partially reverts changes to multilists in PR 7968 (multi-threaded spa-sync()) and adds some cache line alignments to separate read-only multilists and heavily modified refcount's to different cache lines. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored-by: iXsystems, Inc. Closes #12158
This commit is contained in:
@@ -74,20 +74,20 @@ typedef struct arc_state {
|
||||
/*
|
||||
* list of evictable buffers
|
||||
*/
|
||||
multilist_t *arcs_list[ARC_BUFC_NUMTYPES];
|
||||
multilist_t arcs_list[ARC_BUFC_NUMTYPES];
|
||||
/*
|
||||
* supports the "dbufs" kstat
|
||||
*/
|
||||
arc_state_type_t arcs_state;
|
||||
/*
|
||||
* total amount of evictable data in this state
|
||||
*/
|
||||
zfs_refcount_t arcs_esize[ARC_BUFC_NUMTYPES];
|
||||
zfs_refcount_t arcs_esize[ARC_BUFC_NUMTYPES] ____cacheline_aligned;
|
||||
/*
|
||||
* total amount of data in this state; this includes: evictable,
|
||||
* non-evictable, ARC_BUFC_DATA, and ARC_BUFC_METADATA.
|
||||
*/
|
||||
zfs_refcount_t arcs_size;
|
||||
/*
|
||||
* supports the "dbufs" kstat
|
||||
*/
|
||||
arc_state_type_t arcs_state;
|
||||
} arc_state_t;
|
||||
|
||||
typedef struct arc_callback arc_callback_t;
|
||||
|
||||
@@ -153,7 +153,7 @@ struct objset {
|
||||
/* no lock needed: */
|
||||
struct dmu_tx *os_synctx; /* XXX sketchy */
|
||||
zil_header_t os_zil_header;
|
||||
multilist_t *os_synced_dnodes;
|
||||
multilist_t os_synced_dnodes;
|
||||
uint64_t os_flags;
|
||||
uint64_t os_freed_dnodes;
|
||||
boolean_t os_rescan_dnodes;
|
||||
@@ -172,7 +172,7 @@ struct objset {
|
||||
|
||||
/* Protected by os_lock */
|
||||
kmutex_t os_lock;
|
||||
multilist_t *os_dirty_dnodes[TXG_SIZE];
|
||||
multilist_t os_dirty_dnodes[TXG_SIZE];
|
||||
list_t os_dnodes;
|
||||
list_t os_downgraded_dbufs;
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ struct metaslab_class {
|
||||
* List of all loaded metaslabs in the class, sorted in order of most
|
||||
* recent use.
|
||||
*/
|
||||
multilist_t *mc_metaslab_txg_list;
|
||||
multilist_t mc_metaslab_txg_list;
|
||||
|
||||
metaslab_class_allocator_t mc_allocator[];
|
||||
};
|
||||
|
||||
@@ -71,8 +71,9 @@ struct multilist {
|
||||
multilist_sublist_index_func_t *ml_index_func;
|
||||
};
|
||||
|
||||
void multilist_create(multilist_t *, size_t, size_t,
|
||||
multilist_sublist_index_func_t *);
|
||||
void multilist_destroy(multilist_t *);
|
||||
multilist_t *multilist_create(size_t, size_t, multilist_sublist_index_func_t *);
|
||||
|
||||
void multilist_insert(multilist_t *, void *);
|
||||
void multilist_remove(multilist_t *, void *);
|
||||
|
||||
Reference in New Issue
Block a user