Also as Dave pointed out kmalloc is already slabified anyway. And as I
mentioned kmalloc
has fixed size slabs and therefor will waste some memory.
>Now if more drivers start doing fun stuff like the visor.c driver does
>in the 2.5 tree, then it might make more sense to create a URB specific
>slab.
Some drivers are still maintaining bulk URB pools which is just unnecessary
code and mem waste.
They should allocate/free bulk urbs on demand.
visor, usbnet, hci_usb and some other driver allocate URB on demand.
I guess the reason for having driver specific URB pools is because
usb_alloc_urb (using kmalloc) was
slow. Now if it's replaced with slab cache it's no longer the case. So
drivers should not pre-allocate
stuff unnecessary.
It definitely doesn't hurt to have URB specific cache. You get better stats
(like URB slab utilization, etc).
You could chose to do slab poisoning and debug URB allocations and stuff.
You could use slab constructor
to pre-initialize some URB fields.
Max
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/