lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [-mm patch] Show memcg information during OOM (v3)
    * Andrew Morton <akpm@linux-foundation.org> [2009-02-05 13:55:54]:

    > On Tue, 3 Feb 2009 14:46:47 -0800
    > Andrew Morton <akpm@linux-foundation.org> wrote:
    >
    > > > +/**
    > > > + * mem_cgroup_print_mem_info: Called from OOM with tasklist_lock held in
    > > > + * read mode.
    > > > + * @memcg: The memory cgroup that went over limit
    > > > + * @p: Task that is going to be killed
    > > > + *
    > > > + * NOTE: @memcg and @p's mem_cgroup can be different when hierarchy is
    > > > + * enabled
    > > > + */
    > > > +void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
    > > > +{
    > > > + struct cgroup *task_cgrp;
    > > > + struct cgroup *mem_cgrp;
    > > > + /*
    > > > + * Need a buffer on stack, can't rely on allocations. The code relies
    > > > + * on the assumption that OOM is serialized for memory controller.
    > > > + * If this assumption is broken, revisit this code.
    > > > + */
    > > > + static char task_memcg_name[PATH_MAX];
    > > > + static char memcg_name[PATH_MAX];
    > >
    > > I don't think we need both of these. With a bit of shuffling we could
    > > reuse the single buffer?
    >
    > ping?
    >

    We can use a single buffer, I'll post a patch to fix it.


    --
    Balbir


    \
     
     \ /
      Last update: 2009-02-06 03:29    [W:2.304 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site