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: <20180622104217.GV10465@dhcp22.suse.cz>
Date:   Fri, 22 Jun 2018 12:42:17 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     禹舟键 <ufo19890607@...il.com>
Cc:     akpm@...ux-foundation.org, rientjes@...gle.com,
        kirill.shutemov@...ux.intel.com, aarcange@...hat.com,
        penguin-kernel@...ove.sakura.ne.jp, guro@...com,
        yang.s@...baba-inc.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Wind Yu <yuzhoujian@...ichuxing.com>
Subject: Re: [PATCH v9] Refactor part of the oom report in dump_header

On Fri 22-06-18 17:33:12, 禹舟键 wrote:
> Hi Michal
> > diff --git a/include/linux/oom.h b/include/linux/oom.h
> > index 6adac113e96d..5bed78d4bfb8 100644
> > --- a/include/linux/oom.h
> > +++ b/include/linux/oom.h
> > @@ -15,6 +15,20 @@ struct notifier_block;
> >  struct mem_cgroup;
> >  struct task_struct;
> >
> > +enum oom_constraint {
> > +     CONSTRAINT_NONE,
> > +     CONSTRAINT_CPUSET,
> > +     CONSTRAINT_MEMORY_POLICY,
> > +     CONSTRAINT_MEMCG,
> > +};
> > +
> > +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've suggested that this should be a separate patch.
> I've separate this part in patch v7.
> 
> [PATCH v7 1/2] Add an array of const char and enum oom_constraint in
> memcontrol.h
> On Sat 02-06-18 19:58:51, ufo19890607@...il.com wrote:
> >> From: yuzhoujian <yuzhoujian@...ichuxing.com>
> >>
> >> This patch will make some preparation for the follow-up patch: Refactor
> >> part of the oom report in dump_header. It puts enum oom_constraint in
> >> memcontrol.h and adds an array of const char for each constraint.
> 
> > I do not get why you separate this specific part out.
> > oom_constraint_text is not used in the patch. It is almost always
> > preferable to have a user of newly added functionality.
> 
> So do I need to separate this part ?

You misunderstood my suggestion. Let me be more specific. Please
separate the whole new oom_constraint including its _usage_.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ