diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2016-09-10 16:29:53 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2016-09-10 16:29:53 +0000 |
commit | a27815330cdbe9cadfe2b4a3e761ed9093d0f374 (patch) | |
tree | d2601cb0c515a3d970b11d4e8832c534acf78d7a /sys/kern/subr_witness.c | |
parent | 20e45e033ce07f0cfca9605e295fb836011f8971 (diff) | |
download | src-a27815330cdbe9cadfe2b4a3e761ed9093d0f374.tar.gz src-a27815330cdbe9cadfe2b4a3e761ed9093d0f374.zip |
cache: improve scalability by introducing bucket locks
An array of bucket locks is added.
All modifications still require the global cache_lock to be held for
writing. However, most readers only need the relevant bucket lock and in
effect can run concurrently to the writer as long as they use a
different lock. See the added comment for more details.
This is an intermediate step towards removal of the global lock.
Reviewed by: kib
Tested by: pho
Notes
Notes:
svn path=/head/; revision=305684
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index d4359efbd227..ed1203578c2c 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -623,6 +623,14 @@ static struct witness_order_list_entry order_lists[] = { { "vnode interlock", &lock_class_mtx_sleep }, { NULL, NULL }, /* + * VFS namecache + */ + { "ncglobal", &lock_class_rw }, + { "ncbuc", &lock_class_rw }, + { "vnode interlock", &lock_class_mtx_sleep }, + { "ncneg", &lock_class_mtx_sleep }, + { NULL, NULL }, + /* * ZFS locking */ { "dn->dn_mtx", &lock_class_sx }, |