lkml.org 
[lkml]   [2009]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] Export symbol ksize()
    Date
    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...



    \
     
     \ /
      Last update: 2009-02-12 14:15    [W:3.650 / U:0.488 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site