[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHCio2jkE2FGc2g48jm+ddvEbN3hEOoohBM+-871v32N2i2gew@mail.gmail.com>
Date: Fri, 22 Jun 2018 17:33:12 +0800
From: 禹舟键 <ufo19890607@...il.com>
To: mhocko@...nel.org
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
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 ?
Thanks
Powered by blists - more mailing lists