lkml.org 
[lkml]   [1999]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: PATCH 2.3.26: kmalloc GFP_ZERO
    From
    Date
    >>>>> "Jeff" == Jeff Garzik <jgarzik@mandrakesoft.com> writes:

    Jeff> If you add "kcalloc" instead of hacking "kmalloc" as I did,
    Jeff> drivers wanting zeroed pages make the conscious decision of
    Jeff> calling another function, with a potentially slower path.

    I still don't see the point of doing a kcalloc() except for making
    driver code slightly prettier. You have to remember that full pages
    grabbed by the mm system do not come out of kmalloc() but
    get_free_pages().

    Jeff> Such a split would also make it easier to enumerate
    Jeff> architecture-dependent paths. For some architectures may choose
    Jeff> the default -- kmalloc+memset -- and other archs can choose a
    Jeff> page-zeroing idle task, all without affecting
    Jeff> kmalloc/kmem_cache_alloc

    It's possible that pre zeroing pages for the mm system might be a win,
    and if so it is probably a good thing to explore, however we are
    talking two different things here. In the pre-zeroed cage you don't go
    through kmalloc and kmem_cache_alloc (SLAB) at all.

    Jes

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:54    [W:0.022 / U:1.448 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site