Re: [PATCH] Block: Check major number before allocate the bufferin register_blkdev()

From: Jens Axboe
Date: Mon May 10 2010 - 07:56:51 EST


On Mon, May 10 2010, wzt.wzt@xxxxxxxxx wrote:
> Check major number before allocate the buffer, if the major number is not exist,
> and the register_blkdev() called many times, kmalloc()/kfree() will be no need
> to invoked many times. So check the major number before use kmalloc() to allocate
> the buffer will be better.

This would generally be sound advice for performance oriented code, but
I can't see it making any difference here.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/