linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Weizhao Ouyang <o451686892@gmail.com>
Cc: akpm@linux-foundation.org, almasrymina@google.com,
	dave.hansen@linux.intel.com, khandual@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mhocko@suse.com, minchan@kernel.org, osalvador@suse.de,
	pasha.tatashin@soleen.com, weixugc@google.com,
	willy@infradead.org, yang.shi@linux.alibaba.com,
	ying.huang@intel.com, ziy@nvidia.com
Subject: Re: [PATCH 1/1] mm/migrate: de-duplicate migrate_reason strings
Date: Tue, 21 Sep 2021 23:00:04 -0700	[thread overview]
Message-ID: <ad62ee8c-c5c1-e02c-9225-3883f03aa0e1@nvidia.com> (raw)
In-Reply-To: <90e7cefd-5ca0-f284-8c96-743e0f5ef8f4@gmail.com>

On 9/21/21 22:53, Weizhao Ouyang wrote:
> 
> On 2021/9/22 12:17, John Hubbard wrote:
>> In order to remove the need to manually keep three different files in
>> synch, provide a common definition of the mapping between enum
>> migrate_reason, and the associated strings for each enum item.
>>
>> 1. Use the tracing system's mapping of enums to strings, by redefining
>> and reusing the MIGRATE_REASON and supporting macros, and using that to
>> populate the string array in mm/debug.c.
>>
>> 2. Move enum migrate_reason to migrate_mode.h. This is not strictly
>> necessary for this patch, but migrate mode and migrate reason go
>> together, so this will slightly clarify things.
>>
>> Cc: Weizhao Ouyang <o451686892@gmail.com>
>> Cc: "Huang, Ying" <ying.huang@intel.com>
>> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
>> ---
>>   include/linux/migrate.h      | 19 +------------------
>>   include/linux/migrate_mode.h | 13 +++++++++++++
>>   mm/debug.c                   | 20 +++++++++++---------
>>   3 files changed, 25 insertions(+), 27 deletions(-)
> 
> LGTM.
> And, maybe rename the migrate_mode.h?
> 

I thought about this, and after failing to dream up a better
filename, just figured I'd leave it alone. But I'm open to suggestion
there. And it is easy to change, since it's only included from two
places.

> Reviewed-by: Weizhao Ouyang <o451686892@gmail.com>

Thanks for the review!


thanks,
-- 
John Hubbard
NVIDIA


      reply	other threads:[~2021-09-22  6:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  4:17 [PATCH 0/1] mm/migrate: de-duplicate migrate_reason strings John Hubbard
2021-09-22  4:17 ` [PATCH 1/1] " John Hubbard
2021-09-22  5:53   ` Weizhao Ouyang
2021-09-22  6:00     ` John Hubbard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad62ee8c-c5c1-e02c-9225-3883f03aa0e1@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=o451686892@gmail.com \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@soleen.com \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=yang.shi@linux.alibaba.com \
    --cc=ying.huang@intel.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).