lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdaEJgYFUX_MkthFPhimVtJStcinm1P4S-iGfJHvSeiyA@mail.gmail.com>
Date:   Tue, 3 Jul 2018 20:25:33 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     ufo19890607@...il.com
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        David Rientjes <rientjes@...gle.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        aarcange@...hat.com,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>, guro@...com,
        yang.s@...baba-inc.com, linux-mm <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        yuzhoujian@...ichuxing.com
Subject: Re: [PATCH v11 1/2] Refactor part of the oom report in dump_header

On Sat, Jun 30, 2018 at 7:38 PM,  <ufo19890607@...il.com> wrote:
> From: yuzhoujian <yuzhoujian@...ichuxing.com>
>
> The current system wide oom report prints information about the victim
> and the allocation context and restrictions. It, however, doesn't
> provide any information about memory cgroup the victim belongs to. This
> information can be interesting for container users because they can find
> the victim's container much more easily.
>
> I follow the advices of David Rientjes and Michal Hocko, and refactor
> part of the oom report. After this patch, users can get the memcg's
> path from the oom report and check the certain container more quickly.
>
> The oom print info after this patch:
> oom-kill:constraint=<constraint>,nodemask=<nodemask>,oom_memcg=<memcg>,task_memcg=<memcg>,task=<comm>,pid=<pid>,uid=<uid>


> +static const char * const oom_constraint_text[] = {
> +       [CONSTRAINT_NONE] = "CONSTRAINT_NONE",
> +       [CONSTRAINT_CPUSET] = "CONSTRAINT_CPUSET",
> +       [CONSTRAINT_MEMORY_POLICY] = "CONSTRAINT_MEMORY_POLICY",
> +       [CONSTRAINT_MEMCG] = "CONSTRAINT_MEMCG",
> +};

I'm not sure why we have this in the header.

This produces a lot of noise when W=1.

In file included from
/home/andy/prj/linux-topic-mfld/include/linux/memcontrol.h:31:0,
                from /home/andy/prj/linux-topic-mfld/include/net/sock.h:58,
                from /home/andy/prj/linux-topic-mfld/include/linux/tcp.h:23,
                from /home/andy/prj/linux-topic-mfld/include/linux/ipv6.h:87,
                from /home/andy/prj/linux-topic-mfld/include/net/ipv6.h:16,
                from
/home/andy/prj/linux-topic-mfld/net/ipv4/netfilter/nf_log_ipv4.c:17:
/home/andy/prj/linux-topic-mfld/include/linux/oom.h:32:27: warning:
‘oom_constraint_text’ defined but not used [-W
unused-const-variable=]
static const char * const oom_constraint_text[] = {
                          ^~~~~~~~~~~~~~~~~~~
 CC [M]  net/ipv4/netfilter/iptable_nat.o


If you need (but looking at the code you actually don't if I didn't
miss anything) it in several places, just export.
Otherwise put it back to memcontrol.c.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ