cfq-iosched: compact io_context radix_tree
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Thu, 20 May 2010 19:21:41 +0000 (23:21 +0400)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 24 May 2010 07:06:59 +0000 (09:06 +0200)
Use small consequent indexes as radix tree keys instead of sparse cfqd address.

This change will reduce radix tree depth from 11 (6 for 32-bit hosts)
to 1 if host have <=64 disks under cfq control, or to 0 if there only one disk.
So, this patch save 10*560 bytes for each process (5*296 for 32-bit hosts)

For each cfqd allocate cic index from ida.
To unlink dead cic from tree without cfqd access store index into ->key.
(bit 0 -- dead mark, bits 1..30 -- index: ida produce id in range 0..2^31-1)

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/cfq-iosched.c

Simple merge