]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] elevator: define ioc counting mechanism
authorJens Axboe <axboe@suse.de>
Sat, 22 Jul 2006 13:37:43 +0000 (15:37 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Sat, 30 Sep 2006 18:29:36 +0000 (20:29 +0200)
commitcb858c6060db7bbf6cd77c8b0734319cb0984c6e
treea8795f4422eac82679309e1f1f500789c3fd9bff
parent752a515670b6eb032db39a8592f72c88e8a7d768
[PATCH] elevator: define ioc counting mechanism

None of the in-kernel primitives for handling "atomic" counting seem
to be a good fit. We need something that is essentially free for
incrementing/decrementing, while the read side may be more expensive
as we only ever need to do that when a device is removed from the
kernel.

Use a per-cpu variable for maintaining a per-cpu ioc count and define
a reading mechanism that just sums up the values.

Signed-off-by: Jens Axboe <axboe@suse.de>
include/linux/elevator.h