From patchwork Fri Sep 24 22:43:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12516975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC6FEC433EF for ; Fri, 24 Sep 2021 22:43:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9D25261019 for ; Fri, 24 Sep 2021 22:43:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9D25261019 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 441576B0083; Fri, 24 Sep 2021 18:43:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F11B6B0085; Fri, 24 Sep 2021 18:43:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26C896B0087; Fri, 24 Sep 2021 18:43:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 169F86B0083 for ; Fri, 24 Sep 2021 18:43:56 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D12731813BCC7 for ; Fri, 24 Sep 2021 22:43:55 +0000 (UTC) X-FDA: 78623946030.02.A7A0D14 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP id 891B73000100 for ; Fri, 24 Sep 2021 22:43:55 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A7B361260; Fri, 24 Sep 2021 22:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1632523434; bh=sE8CPBkZHP3RfzSPxnIzjhaUGKIMli0dMYDYZte4y84=; h=Date:From:To:Subject:In-Reply-To:From; b=oKxee1FHUqdM0CFGqdMcIj7BjcDadvRbDBlMxyB8wJnLrRyj2vZej3fHh0Ra/nyMw nYgkli6nWq2OTuuJGl1aS2lx/c0ii5YRm5yxLwub3KxH2U4+iXNXfQuYbzaVKPHAOl S7JBP2DqYQwhAYwpuVCEL3d5h5b6/VPIcjHzSQ3s= Date: Fri, 24 Sep 2021 15:43:53 -0700 From: Andrew Morton To: akpm@linux-foundation.org, almasrymina@google.com, dave.hansen@linux.intel.com, jhubbard@nvidia.com, khandual@linux.vnet.ibm.com, linux-mm@kvack.org, mhocko@suse.com, minchan@kernel.org, mm-commits@vger.kernel.org, o451686892@gmail.com, osalvador@suse.de, pasha.tatashin@soleen.com, torvalds@linux-foundation.org, weixugc@google.com, willy@infradead.org, yang.shi@linux.alibaba.com, ying.huang@intel.com, ziy@nvidia.com Subject: [patch 12/16] mm/debug: sync up latest migrate_reason to migrate_reason_names Message-ID: <20210924224353.M5QtsjROk%akpm@linux-foundation.org> In-Reply-To: <20210924154257.1dbf6699ab8d88c0460f924f@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 891B73000100 X-Stat-Signature: d6g3m3smiz7ei1o7itbpkpbs3m1r8d6e Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=oKxee1FH; dmarc=none; spf=pass (imf09.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1632523435-128485 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Weizhao Ouyang Subject: mm/debug: sync up latest migrate_reason to migrate_reason_names Sync up MR_DEMOTION to migrate_reason_names and add a synch prompt. Link: https://lkml.kernel.org/r/20210921064553.293905-3-o451686892@gmail.com Fixes: 26aa2d199d6f ("mm/migrate: demote pages during reclaim") Signed-off-by: Weizhao Ouyang Reviewed-by: "Huang, Ying" Reviewed-by: John Hubbard Cc: Anshuman Khandual Cc: Michal Hocko Cc: Pavel Tatashin Cc: Yang Shi Cc: Zi Yan Cc: Dave Hansen Cc: Minchan Kim Cc: Mina Almasry Cc: "Matthew Wilcox (Oracle)" Cc: Oscar Salvador Cc: Wei Xu Signed-off-by: Andrew Morton --- include/linux/migrate.h | 6 +++++- mm/debug.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) --- a/include/linux/migrate.h~mm-debug-sync-up-latest-migrate_reason-to-migrate_reason_names +++ a/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 --- a/mm/debug.c~mm-debug-sync-up-latest-migrate_reason-to-migrate_reason_names +++ a/mm/debug.c @@ -26,6 +26,7 @@ const char *migrate_reason_names[MR_TYPE "numa_misplaced", "contig_range", "longterm_pin", + "demotion", }; const struct trace_print_flags pageflag_names[] = {