Skip to content

Commit

Permalink
Reduce dbuf_find() mutex contention
Browse files Browse the repository at this point in the history
Due to evidence of contention both the buf_hash_table and the
dbuf_hash_table sizes have been increased from 256 to 8192.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1291
  • Loading branch information
cwedgwood authored and behlendorf committed Oct 23, 2014
1 parent 9635861 commit 6d58fc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/sys/dbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ typedef struct dmu_buf_impl {
} dmu_buf_impl_t;

/* Note: the dbuf hash table is exposed only for the mdb module */
#define DBUF_MUTEXES 256
#define DBUF_MUTEXES 8192
#define DBUF_HASH_MUTEX(h, idx) (&(h)->hash_mutexes[(idx) & (DBUF_MUTEXES-1)])
typedef struct dbuf_hash_table {
uint64_t hash_table_mask;
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ struct ht_lock {
#endif
};

#define BUF_LOCKS 256
#define BUF_LOCKS 8192
typedef struct buf_hash_table {
uint64_t ht_mask;
arc_buf_hdr_t **ht_table;
Expand Down

0 comments on commit 6d58fc8

Please sign in to comment.