Skip to content

Commit

Permalink
block: cfq: make the io contect sharing lockless
Browse files Browse the repository at this point in the history
The io context sharing introduced a per-ioc spinlock, that would protect
the cfq io context lookup. That is a regression from the original, since
we never needed any locking there because the ioc/cic were process private.

The cic lookup is changed from an rbtree construct to a radix tree, which
we can then use RCU to make the reader side lockless. That is the performance
critical path, modifying the radix tree is only done on process creation
(when that process first does IO, actually) and on process exit (if that
process has done IO).

As it so happens, radix trees are also much faster for this type of
lookup where the key is a pointer. It's a very sparse tree.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Jan 28, 2008
1 parent 66dac98 commit 4ac845a
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 137 deletions.
Loading

0 comments on commit 4ac845a

Please sign in to comment.