lkml.org 
[lkml]   [2011]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[slubllv7 16/17] slub: Not necessary to check for empty slab on load_freelist
    load_freelist is now only branched to only if there are objects available.
    So no need to check the object variable for NULL.

    ---
    mm/slub.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    Index: linux-2.6/mm/slub.c
    ===================================================================
    --- linux-2.6.orig/mm/slub.c 2011-05-31 14:27:21.372880046 -0500
    +++ linux-2.6/mm/slub.c 2011-05-31 14:27:25.262880020 -0500
    @@ -1997,9 +1997,6 @@ static void *__slab_alloc(struct kmem_ca
    NULL, new.counters,
    "__slab_alloc"));

    -load_freelist:
    - VM_BUG_ON(!page->frozen);
    -
    if (unlikely(!object)) {
    c->page = NULL;
    stat(s, DEACTIVATE_BYPASS);
    @@ -2008,6 +2005,8 @@ load_freelist:

    stat(s, ALLOC_REFILL);

    +load_freelist:
    + VM_BUG_ON(!page->frozen);
    c->freelist = get_freepointer(s, object);
    c->tid = next_tid(c->tid);
    local_irq_restore(flags);


    \
     
     \ /
      Last update: 2011-06-01 19:29    [W:0.021 / U:29.800 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site