lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -v2] mm: SLAB Out-of-memory diagnostics
    On Mon, 5 Mar 2012, Rafael Aquini wrote:

    > diff --git a/mm/slab.c b/mm/slab.c
    > index f0bd785..4aeb5e7 100644
    > --- a/mm/slab.c
    > +++ b/mm/slab.c
    > @@ -1731,6 +1731,52 @@ static int __init cpucache_init(void)
    > }
    > __initcall(cpucache_init);
    >
    > +static noinline void
    > +slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
    > +{
    > + struct kmem_list3 *l3;
    > + struct slab *slabp;
    > + unsigned long flags;
    > + int node;
    > +
    > + printk(KERN_WARNING
    > + "SLAB: Unable to allocate memory on node %d (gfp=0x%x)\n",
    > + nodeid, gfpflags);
    > + printk(KERN_WARNING " cache: %s, object size: %d, order: %d\n",
    > + cachep->name, cachep->buffer_size, cachep->gfporder);
    > +
    > + for_each_online_node(node) {
    > + unsigned long active_objs = 0, num_objs = 0, free_objects = 0;
    > + unsigned long active_slabs = 0, num_slabs = 0;
    > +
    > + l3 = cachep->nodelists[node];
    > + if (!l3)
    > + continue;
    > +
    > + spin_lock_irqsave(&l3->list_lock, flags);

    Could be spin_lock_irq(&l3->list_lock);


    \
     
     \ /
      Last update: 2012-03-07 04:45    [W:0.027 / U:0.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site