Re: [PATCH v3 next/akpm] aio: convert the ioctx list to radix tree

From: Zach Brown
Date: Wed Jun 12 2013 - 16:24:13 EST

> I've got an alternate approach for fixing this wart in lookup_ioctx()...
> Instead of using an rbtree, just use the reserved id in the ring buffer
> header to index an array pointing the ioctx. It's not finished yet, and
> it needs to be tidied up, but is most of the way there.

Yeah, that might work.

Note that the patch wasn't using an rbtree, it was storing the pointer
value in a *radix* which is why single lookups took so long. Presumably
radix was used for RCU lookups.

Your ring->id trick lets us use RCU with small ints instead of the
context pointer. It might be worth using idr instead of rolling manual
array code. It'd still be much faster than the list, but get rid of the
large alloc, array walking, memcpy(), etc.

- z
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at