HomeFreeBSD

cache: improve scalability by introducing bucket locks

Description

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

Details

Provenance
mjgAuthored on
Reviewer
kib
Parents
rS305683: Pull in r280350 from upstream llvm trunk (by Hal Finkel):
Branches
Unknown
Tags
Unknown