On 21/11/12 13:09, Dan Carpenter wrote:
On Tue, Nov 20, 2012 at 04:18:06PM +0000, Rupesh Gujare wrote:
On 20/11/12 14:16, Dan Carpenter wrote:
But more importantly does any of the memory pools code actually
make a difference in benchmarks? What is the difference between
running with OZ_MAX_TX_POOL_SIZE as zero and it set to 6?
Agree. Thats is a good test to look for.
We have this very complicated code with spinlocks and linked lists
to save six 56 byte allocations... It's silly. :P Just use
kmalloc().
Probably we will need to kmalloc() & kfree() few hundred times every
second when data transfer is taking places. By maintaining a pool of
6, we avoid calling kmalloc frequently. Although I agree that some
benchmarking is required here to verify that we actually get some
advantage with current implementation.
The kernel already provides a way to handle this. Look at
kmem_cache_create().
Thanks Dan,
I will have a look at it.
--
Regards,
Rupesh Gujare
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel