lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[10/14] vcompound: slub: Use for buffer to correlate allocation addresses
    The caller table can get quite large if there are many call sites for a
    particular slab. Using a virtual compound page allows fallback to vmalloc in
    case the caller table gets too big and memory is fragmented. Currently we
    would fail the operation.

    Signed-off-by: Christoph Lameter <clameter@sgi.com>
    ---
    mm/slub.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    Index: linux-2.6.25-rc5-mm1/mm/slub.c
    ===================================================================
    --- linux-2.6.25-rc5-mm1.orig/mm/slub.c 2008-03-20 18:04:44.153110938 -0700
    +++ linux-2.6.25-rc5-mm1/mm/slub.c 2008-03-20 19:40:17.103393950 -0700
    @@ -21,6 +21,7 @@
    #include <linux/ctype.h>
    #include <linux/kallsyms.h>
    #include <linux/memory.h>
    +#include <linux/vmalloc.h>

    /*
    * Lock order:
    @@ -3372,8 +3373,7 @@ struct loc_track {
    static void free_loc_track(struct loc_track *t)
    {
    if (t->max)
    - free_pages((unsigned long)t->loc,
    - get_order(sizeof(struct location) * t->max));
    + __free_vcompound(t->loc);
    }

    static int alloc_loc_track(struct loc_track *t, unsigned long max, gfp_t flags)
    @@ -3383,7 +3383,7 @@ static int alloc_loc_track(struct loc_tr

    order = get_order(sizeof(struct location) * max);

    - l = (void *)__get_free_pages(flags, order);
    + l = __alloc_vcompound(flags, order);
    if (!l)
    return 0;

    --


    \
     
     \ /
      Last update: 2008-03-21 07:27    [W:4.116 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site