Skip to content

Commit

Permalink
fs/mbcache.c: doucple the locking of local from global data
Browse files Browse the repository at this point in the history
The patch increases the parallelism of mbcache by using the built-in
lock in the hlist_bl_node to protect the mb_cache's local block and
index hash chains.  The global data mb_cache_lru_list and
mb_cache_list continue to be protected by the global
mb_cache_spinlock.

New block group spinlock, mb_cache_bg_lock is also added to serialize
accesses to mb_cache_entry's local data.

A new member e_refcnt is added to the mb_cache_entry structure to help
preventing an mb_cache_entry from being deallocated by a free while it
is being referenced by either mb_cache_entry_get() or
mb_cache_entry_find().

Signed-off-by: T. Makphaibulchoke <tmac@hp.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
T Makphaibulchoke authored and Theodore Ts'o committed Mar 18, 2014
1 parent 3e037e5 commit 1f3e55f
Showing 1 changed file with 301 additions and 116 deletions.
Loading

0 comments on commit 1f3e55f

Please sign in to comment.