From: Weizhao Ouyang <o451686892@gmail.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
Michal Hocko <mhocko@suse.com>,
John Hubbard <jhubbard@nvidia.com>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Yang Shi <yang.shi@linux.alibaba.com>, Zi Yan <ziy@nvidia.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Minchan Kim <minchan@kernel.org>,
Mina Almasry <almasrymina@google.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Oscar Salvador <osalvador@suse.de>, Wei Xu <weixugc@google.com>
Subject: Re: [PATCH v2 2/2] mm/debug: sync up latest migrate_reason to migrate_reason_names
Date: Tue, 21 Sep 2021 15:31:27 +0800 [thread overview]
Message-ID: <d57aaff2-b154-4462-1a7d-3d288ebabb6a@gmail.com> (raw)
In-Reply-To: <87mto676fq.fsf@yhuang6-desk2.ccr.corp.intel.com>
On 2021/9/21 15:07, Huang, Ying wrote:
> Weizhao Ouyang <o451686892@gmail.com> writes:
>
>> Sync up MR_DEMOTION to migrate_reason_names and add a synch prompt.
>>
>> Fixes: 26aa2d199d6f ("mm/migrate: demote pages during reclaim")
>> Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
>> Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
>> ---
>> include/linux/migrate.h | 6 +++++-
>> mm/debug.c | 1 +
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/migrate.h b/include/linux/migrate.h
>> index 326250996b4e..c8077e936691 100644
>> --- a/include/linux/migrate.h
>> +++ b/include/linux/migrate.h
>> @@ -19,6 +19,11 @@ struct migration_target_control;
>> */
>> #define MIGRATEPAGE_SUCCESS 0
>>
>> +/*
>> + * Keep sync with:
>> + * - macro MIGRATE_REASON in include/trace/events/migrate.h
>> + * - migrate_reason_names[MR_TYPES] in mm/debug.c
>> + */
>> enum migrate_reason {
>> MR_COMPACTION,
>> MR_MEMORY_FAILURE,
>> @@ -32,7 +37,6 @@ enum migrate_reason {
>> MR_TYPES
>> };
>>
>> -/* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
>> extern const char *migrate_reason_names[MR_TYPES];
>>
>> #ifdef CONFIG_MIGRATION
>> diff --git a/mm/debug.c b/mm/debug.c
>> index e61037cded98..fae0f81ad831 100644
>> --- a/mm/debug.c
>> +++ b/mm/debug.c
>> @@ -26,6 +26,7 @@ const char *migrate_reason_names[MR_TYPES] = {
>> "numa_misplaced",
>> "contig_range",
>> "longterm_pin",
>> + "demotion",
>> };
>>
>> const struct trace_print_flags pageflag_names[] = {
> Can we add BUILD_BUG_ON() somewhere to capture at least some
> synchronization issue?
Hi Huang, we discussed this in the v1 thread with you and John, seems you
missed it. Now we just add a comment to do the synchronization, and we can
figure out a more general way to use strings which in trace_events straight.
Thanks,
Weizhao
next prev parent reply other threads:[~2021-09-21 7:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210921064553.293905-1-o451686892@gmail.com>
2021-09-21 6:45 ` [PATCH v2 2/2] mm/debug: sync up latest migrate_reason to migrate_reason_names Weizhao Ouyang
2021-09-21 7:07 ` Huang, Ying
2021-09-21 7:31 ` Weizhao Ouyang [this message]
2021-09-21 14:06 ` Huang, Ying
2021-09-21 18:00 ` John Hubbard
2021-09-21 21:53 ` John Hubbard
2021-09-22 2:07 ` Huang, Ying
2021-09-22 4:49 ` John Hubbard
[not found] ` <20210921064553.293905-2-o451686892@gmail.com>
2021-09-22 4:48 ` [PATCH v2 1/2] mm/debug: sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN John Hubbard
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=d57aaff2-b154-4462-1a7d-3d288ebabb6a@gmail.com \
--to=o451686892@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=jhubbard@nvidia.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=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).