From patchwork Tue Sep 21 06:45:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weizhao Ouyang X-Patchwork-Id: 12507285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45255C433F5 for ; Tue, 21 Sep 2021 06:46:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CE7896008E for ; Tue, 21 Sep 2021 06:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE7896008E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 66BB8900002; Tue, 21 Sep 2021 02:46:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61ACC6B0072; Tue, 21 Sep 2021 02:46:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E26A900002; Tue, 21 Sep 2021 02:46:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id 3F5FD6B0071 for ; Tue, 21 Sep 2021 02:46:55 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id ED33518163917 for ; Tue, 21 Sep 2021 06:46:54 +0000 (UTC) X-FDA: 78610647948.06.70B94A4 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf22.hostedemail.com (Postfix) with ESMTP id A47391903 for ; Tue, 21 Sep 2021 06:46:54 +0000 (UTC) Received: by mail-pf1-f175.google.com with SMTP id y4so17030535pfe.5 for ; Mon, 20 Sep 2021 23:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6oTXrjPbExj9E3UFA1PYlNf37y3ZhK96brFnlr68vX0=; b=XolRtbTLpdTfq/4v1+yt+8zmN3QAcvXP7hAzvuDooqQkpTH4nSnQzyoV784qK53fJt 9BWM4Y8nKasbVfmwH0TJ9TslR/owQ8irBj3vygM+6SgkRf4euqsgxa6TZPvTmF84ayrX Y2WGyts1qA2KiYzlg85IgmBrTZJgAyYISrGdvRZpO5C5s5FeVCmOCEWVabas3J+7L1xV ww/xDeMM7emdWd55ifqkDYKkVZzX/IwunkoHxhrFakxPdqO3ssceJPx8v0yLTww94sIZ lB5lJLgiWBOk2lsWnO8A38TIAkgL7kVqQVnfuz6VcaqpNHLB0mpzebToXrkkgCOnLxMS CmKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6oTXrjPbExj9E3UFA1PYlNf37y3ZhK96brFnlr68vX0=; b=l5ARAP8WcysDrTdArXIWGVnr6175gnPfto+AgQ2izLWvJnc8XYFnbjlFP9ldg6Jva3 4GQYxjmlxN2B5as5Q5h6BcveDXKFc8DpFxi2YSUQCcAd5tSD2FibpZ1tJ/iY6gXXeZAn jv8MwbS8Gi2+isPEyyXWWHPrRYTrXVqiSj8PPf2Xup/MB/4rGE7hiiVWRE9urwQGvnSB o3iflmsHk1FO4rIUcWPiyuOhvuNBt7TOsZUy++gQCKNCcFQM3oUaXwYmmi0MVqVS/XAi S7hijoOQIBoyiN0KZovUwzn4hFIwpLIO7d+ebMX6ZFDSPS1lh0Vtdb6V3IC7Lh3Au1vJ 1S+g== X-Gm-Message-State: AOAM532lOce+OBowGn+ck0166L1MXT+Vh9GWNxCCIjqTTK0inotxT+7b /wgv2Nmms83pBiJfAgD1ocA= X-Google-Smtp-Source: ABdhPJzqbHJz/HRSdsP3LbXPha6p/m5fcMEQ9rl3YMbfV+DSl1V+gCYTNcprlJqipTU1S5c4tF1HPA== X-Received: by 2002:a63:4344:: with SMTP id q65mr26792470pga.364.1632206813834; Mon, 20 Sep 2021 23:46:53 -0700 (PDT) Received: from ownia.. ([103.97.201.35]) by smtp.gmail.com with ESMTPSA id a1sm1413101pjg.0.2021.09.20.23.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 23:46:53 -0700 (PDT) From: Weizhao Ouyang To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Anshuman Khandual , Michal Hocko , John Hubbard , Pavel Tatashin , Yang Shi , Zi Yan , Dave Hansen , Minchan Kim , Weizhao Ouyang , Mina Almasry , "Matthew Wilcox (Oracle)" , "Huang, Ying" , Oscar Salvador , Wei Xu Subject: [PATCH v2 2/2] mm/debug: sync up latest migrate_reason to migrate_reason_names Date: Tue, 21 Sep 2021 14:45:53 +0800 Message-Id: <20210921064553.293905-3-o451686892@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210921064553.293905-1-o451686892@gmail.com> References: <20210921064553.293905-1-o451686892@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A47391903 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XolRtbTL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of o451686892@gmail.com designates 209.85.210.175 as permitted sender) smtp.mailfrom=o451686892@gmail.com X-Stat-Signature: 7kipte745khp85p4fz6uqprn9qm6sr5n X-HE-Tag: 1632206814-767751 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: 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 Reviewed-by: "Huang, Ying" Reviewed-by: John Hubbard --- 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[] = {