lkml.org 
[lkml]   [2012]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Uninline kcalloc
    From
    On Tue, Feb 14, 2012 at 10:45 PM, Andrew Morton
    <akpm@linux-foundation.org> wrote:
    > On Tue, 14 Feb 2012 13:33:40 -0600 (CST)
    > Christoph Lameter <cl@linux.com> wrote:
    >
    >> Subject: Uninline kcalloc
    >>
    >> kcalloc is not used in performance critical ways. So it does not need to
    >> be inline. If we would add diagnostics to track the overflow occurrences
    >> then such code would be replicated at all call sites in the kernel.
    >
    > Uninlining kcalloc() seems reasonable.  But if we're going to uninline
    > kcalloc() then we also should uninline kmalloc_array().

    Well, kcalloc() used to be uninline and we made it inline on purpose
    at some point. I don't have a git tree here so I can't check. IIRC it
    had something to do with kernel text size reduction.

    > And yes, it's still called kmalloc_array() in my tree.  I've been
    > following this discussion for N days waiting for a reason for changing
    > the original patch and I ain't seen one yet.

    Me neither. I don't think Christoph's SAFE_ARRAY_SIZE() suggestion
    makes much sense, really. It's more verbose, less obvious API, and
    doesn't really deal with the overflow case cleanly.

    Pekka
    --
    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/

    \
     
     \ /
      Last update: 2012-02-14 22:01    [W:3.369 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site