Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2247342pxb; Fri, 17 Sep 2021 05:49:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydTiN6dxIm+1XYTzptx5YJ95aKHWu5QyJUEu5eA5kIHltRmNng/y40whRWsD3DNcBV9AkR X-Received: by 2002:a17:906:c005:: with SMTP id e5mr12128510ejz.480.1631882958052; Fri, 17 Sep 2021 05:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631882958; cv=none; d=google.com; s=arc-20160816; b=jAoeCU8pbDOSUPkbr5Ilytje7SJ2XYdRDmGgXcXnciZur31zqbij32zrlFFVio+U92 dqMSMAYOvi+khmlL6oFbkZBugejPcplcbIUVD1RyB555nXCe8bOzGlvaJ0jaI2x2FySW eYsWA7n4Lh5vxlFdve8DWFNjxNyyLD2P5miQHJ4LUL+GUgrIT1Rr3wbQDJTSmy/3+J/J k4rq9mNestZVzJJHF1sioozfFnhmZJZIcuKWRDRsbtSiUg/2b0g1ygoRRTVt3Gq/JkNt cBXDcpg5ql6L/asjH1Pn1pCco31HL1b83cddJoHa0gPGmWJAkl0bHfYGbQA0lgRKGi4e HfGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=dAg9S9XLCBKNUVaueoc2Izzpy8f06X4mjI1233SZY6c=; b=bbiYFHSxk6WRDRfy7sL+Lae03C6Bx5XT5R/zRFiFJ1AjU7kqtTG+wak5/wENfS0W1I QFKGcv+GUKxzIJ/NkvszCp7a0uyQ9U1MroD9gZVNbPzb2xanDzRCg3erRJd8Yb7rn9fA +LTmIiSw5L7QHkPjvQC9siEHgMvW3jmgFSmnSSZo9N2XxgzIaXVuyYYlC9oHtRvfidtS xtfRnqP+gOiebbtBXVaqeKzYFyi179CVvduQBMT28Bm8JQu4Y+teSwB1EjQTSRvGp1Zr iRLse3egpKyowAjNWiN5mMydfQXWR/25QYDiM8Zy/XNosuZPqJhqa8DfJg032YqAvthq 4n8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si6796246ejk.187.2021.09.17.05.48.47; Fri, 17 Sep 2021 05:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236399AbhIQHFO (ORCPT + 99 others); Fri, 17 Sep 2021 03:05:14 -0400 Received: from mga17.intel.com ([192.55.52.151]:55360 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbhIQHFO (ORCPT ); Fri, 17 Sep 2021 03:05:14 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10109"; a="202895715" X-IronPort-AV: E=Sophos;i="5.85,300,1624345200"; d="scan'208";a="202895715" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2021 00:03:52 -0700 X-IronPort-AV: E=Sophos;i="5.85,300,1624345200"; d="scan'208";a="546223904" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2021 00:03:50 -0700 From: "Huang, Ying" To: Weizhao Ouyang Cc: Andrew Morton , John Hubbard , Pavel Tatashin , Oscar Salvador , Yang Shi , Zi Yan , Dave Hansen , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/debug: sync up latest migrate_reason to migrate_reason_names References: <20210917061432.323777-1-o451686892@gmail.com> Date: Fri, 17 Sep 2021 15:03:48 +0800 In-Reply-To: <20210917061432.323777-1-o451686892@gmail.com> (Weizhao Ouyang's message of "Fri, 17 Sep 2021 14:14:32 +0800") Message-ID: <871r5nptt7.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Weizhao Ouyang writes: > After related migrate page updates, sync up latest migrate_reason to > migrate_reason_names, page_owner use it to parse the page migrate > reason. > > Fixes: d1e153fea2a8 ("mm/gup: migrate pinned pages out of movable zone") > Fixes: 26aa2d199d6f ("mm/migrate: demote pages during reclaim") > Signed-off-by: Weizhao Ouyang > --- > mm/debug.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/debug.c b/mm/debug.c > index e73fe0a8ec3d..733770b0ed0c 100644 > --- a/mm/debug.c > +++ b/mm/debug.c > @@ -25,6 +25,8 @@ const char *migrate_reason_names[MR_TYPES] = { > "mempolicy_mbind", > "numa_misplaced", > "cma", > + "longterm_pin", > + "demotion", > }; > > const struct trace_print_flags pageflag_names[] = { Good catch! Thanks! Reviewed-by: "Huang, Ying" It may be better to use BUILD_BUG_ON() to capture similar issue earlier? Best Regards, Huang, Ying