Re: [PATCH 1/1] mm/migrate: de-duplicate migrate_reason strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> ---
>  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?

Reviewed-by: Weizhao Ouyang <o451686892@xxxxxxxxx>

Thanks,
Weizhao




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux