search for: caching_thread

Displaying 4 results from an estimated 4 matches for "caching_thread".

Did you mean: caching_kthread
2013 Aug 29
4
[PATCH] Notify caching_thread()s to give up on extent_commit_sem when needed.
caching_thread()s do all their work under read access to extent_commit_sem. They give up on this read access only when need_resched() tells them, or when they exit. As a result, somebody that wants a WRITE access to this sem, might wait for a long time. Especially this is problematic in cache_block_group(), which...
2010 Apr 19
0
Memory barrier not required in cached_block_group
...86 or x86-64 should not reorder it.However,Alpha might reorder it.So memory barrier maybe required in Alpha case. Again,in function find_free_extent the code snippet is if (loop > LOOP_CACHING_NOWAIT || (loop > LOOP_FIND_IDEAL && atomic_read(&space_info->caching_threads) < 2)) { ret = cache_block_group(block_group); BUG_ON(ret); } In this code also I believe the architecture should not reorder the read with atomic_read of caching_threads because of if condition and x86-64 not doing read reordering from software point of view.Also,any wri...
2013 Aug 30
17
[PATCH] rwsem: add rwsem_is_contended
Btrfs uses an rwsem to control access to its extent tree. Threads will hold a read lock on this rwsem while they scan the extent tree, and if need_resched() they will drop the lock and schedule. The transaction commit needs to take a write lock for this rwsem for a very short period to switch out the commit roots. If there are a lot of threads doing this caching operation we can starve out the
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...rans, bytenr, num_bytes, parent, root_objectid, owner, offset, BTRFS_DROP_DELAYED_REF, NULL); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } return ret; } @@ -4663,7 +4663,7 @@ have_block_group: (loop > LOOP_FIND_IDEAL && atomic_read(&space_info->caching_threads) < 2)) { ret = cache_block_group(block_group); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } found_uncached_bg = true; @@ -5088,7 +5088,7 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans, path->leave_spinning = 1; ret = btrfs_insert_empty_ite...