lkml.org 
[lkml]   [2018]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9] Refactor part of the oom report in dump_header
Hi Michal
> You misunderstood my suggestion. Let me be more specific. Please
> separate the whole new oom_constraint including its _usage_.

Sorry for misunderstanding your words. I think you want me to separate
enum oom_constraint and static const char * const
oom_constraint_text[] to two parts, am I right ?
Michal Hocko <mhocko@kernel.org> 于2018年6月22日周五 下午6:42写道:
>
> 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@gmail.com wrote:
> > >> From: yuzhoujian <yuzhoujian@didichuxing.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

\
 
 \ /
  Last update: 2018-06-22 13:42    [W:0.059 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site