tux3: Optimize deferred inums search

For now, we are using inode hash to find, deferred allocated
inums. But, loop of find_inode() consumes cpu and slow on some
situations.

To fix, this replaces inode hash with simple deferred inums bitmap.

struct tux3_idefer_map is hash table.
struct tux3_idefer_node is bitmap for BITMAP_SIZE bits.

"node" has index and count, and hashed into "map".

With this simple bitmap, we can find free inum (skip deferred inums)
by find_next_zero_bit().

And dbench become about from 50MB/s to 400 MB/s. (For now, it seems to
be fast)

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
5 files changed