• Herbert Xu's avatar
    [IPCOMP]: Use per-cpu buffers for compression/decompression. · 34d67af8
    Herbert Xu authored
    Here is a really ugly patch to get IPCOMP to use per-cpu buffers.  But
    I'm afraid it really is necessary.  At 300K per SA IPCOMP isn't very
    affordable at all.
    
    With per-cpu buffers this goes down to 300K per CPU.
    
    I've also turned the kmalloc'ed scratch space into a vmalloc'ed one
    since people may be loading the ipcomp module after the system has
    been running for a while.  On an i386 machine with 64M of RAM or less
    this can often cause a 64K kmalloc to fail.
    
    The crypto deflate buffer space are vmalloc'ed already as well.
    
    Part of the ugliness comes from the lazy allocation.  However we need
    the lazy initialisation since new IPCOMP algorithms may be introduced
    in future.  That means we can't allocate space for every single IPCOMP
    algorithm at module-load time.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    34d67af8
ipcomp.h 159 Bytes