lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] mm/migrate: de-duplicate migrate_reason strings
From
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

\
 
 \ /
  Last update: 2021-09-22 08:01    [W:0.626 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site