On Thursday 12 February 2009 21:50:34 Herbert Xu wrote: > On Thu, Feb 12, 2009 at 12:45:21PM +0200, Pekka Enberg wrote: > > Because the API was being widely abused in the nommu code, for example. > > I'd rather not add it back for this special case which can be handled > > otherwise. > > I'm sorry but that's like banning the use of heaters just because > they can abused and cause fires. > > I think I've said this to you before but in networking we very much > want to use ksize because the standard case of a 1500-byte packet > has loads of extra room given by kmalloc which all goes to waste > right now. I'm not against the idea of exporting ksize. It is a fairly well commented function. I'd be up for nearly anything in the slab layer that speeds up networking, to be honest ;) > If we could use ksize then we can stuff loads of metadata in that > space. I would be interested to know how that goes. You always have this circular issue that if a little more space helps significantly, then maybe it is a good idea to explicitly ask for those bytes. Of course that larger allocation is also likely to have some slack bytes. So the benefit you get from using these slack bytes has to be larger than the cost of using ksize, but smaller than the cost of explicitly asking for more bytes at alloc time. Interesting... -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html