lkml.org 
[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 8/8] Jhash in too big for inlining, move under lib/
    From
    Date
    Andrew Morton <akpm@linux-foundation.org> writes:
    >
    > It should be possible to use a modular jhash.ko. The things which you
    > have identified as clients of the jhash library are usually loaded as modules.

    For very small functions like this own modules are quite expensive. First
    everything gets rounded up to at least one 4K page (or worse on architectures
    with larger pages). That just wastes some memory.

    But then since modules live in vmalloc space they also need an own
    TLB entry, which are notouriously scarce in the kernel because often user space
    wants to monopolize them all. So if you're unlucky and user space
    is thrashing the TLB just a single call to this hash function will be an own
    TLB miss and quite expensive.

    It would be better to just always link it in for this case.

    -Andi


    \
     
     \ /
      Last update: 2008-02-23 14:09    [W:6.026 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site