diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-23 09:32:30 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-23 09:32:30 -0800 |
commit | 52722794d6a48162fd8906d54618ae60a4abdb21 (patch) | |
tree | 9395231ed86edd40880a3438f77d10af2f6d953a /fs/adfs | |
parent | c68eee14ec2da345e86f2778c8570759309a4a2e (diff) | |
download | linux-52722794d6a48162fd8906d54618ae60a4abdb21.tar.gz linux-52722794d6a48162fd8906d54618ae60a4abdb21.tar.bz2 linux-52722794d6a48162fd8906d54618ae60a4abdb21.zip |
async: keep pending tasks on async_domain and remove async_pending
Async kept single global pending list and per-domain running lists.
When an async item is queued, it's put on the global pending list.
The item is moved to the per-domain running list when its execution
starts.
At this point, this design complicates execution and synchronization
without bringing any benefit. The list only matters for
synchronization which doesn't care whether a given async item is
pending or executing. Also, global synchronization is done by
iterating through all active registered async_domains, so the global
async_pending list doesn't help anything either.
Rename async_domain->running to async_domain->pending and put async
items directly there and remove when execution completes. This
simplifies lowest_in_progress() a lot - the first item on the pending
list is the one with the lowest cookie, and async_run_entry_fn()
doesn't have to mess with moving the item from pending to running.
After the change, whether a domain is empty or not can be trivially
determined by looking at async_domain->pending. Remove
async_domain->count and use list_empty() on pending instead.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/adfs')
0 files changed, 0 insertions, 0 deletions