From patchwork Wed Oct 28 02:34:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 11862373 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 262C714B2 for ; Wed, 28 Oct 2020 02:34:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0BDD22282 for ; Wed, 28 Oct 2020 02:34:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0BDD22282 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2B73C6B005D; Tue, 27 Oct 2020 22:34:55 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 267B36B0062; Tue, 27 Oct 2020 22:34:55 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13CE06B0068; Tue, 27 Oct 2020 22:34:55 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id DADC16B005D for ; Tue, 27 Oct 2020 22:34:54 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 73E231EF1 for ; Wed, 28 Oct 2020 02:34:54 +0000 (UTC) X-FDA: 77419766508.14.lace58_350c2a527281 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 5734018229818 for ; Wed, 28 Oct 2020 02:34:54 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,ying.huang@intel.com,,RULES_HIT:30054:30064,0,RBL:192.55.52.120:@intel.com:.lbl8.mailshell.net-62.50.0.100 64.95.201.95;04y896cx7h17o7tcheuhusghpz3e8ych5ry73d414e7sf5z9sd133px499m1gcd.xde8k9cd4x5mcsxhm8wta9dy61e8hqrwkgoibimb6ksefk7qohepafd8kb7hqcp.h-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:68,LUA_SUMMARY:none X-HE-Tag: lace58_350c2a527281 X-Filterd-Recvd-Size: 4970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 28 Oct 2020 02:34:52 +0000 (UTC) IronPort-SDR: fMNHpPcxxz7+s+l1+qhNBvOtsofvBy02uKtq0wuBd2drRnkJjlYtq6rgoOc/GvSOMsAEckEbMs yPr1iRBY9ZoQ== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="165603431" X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="165603431" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 19:34:51 -0700 IronPort-SDR: c1aqiQPQsqTUmNeuM7DVVFekAL5OWUy7ZExe5LcGSZ3ga64EKs/WQGujUR/c8BAY8DAC0ceAJd DT5rttAA/z/Q== X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="536043658" Received: from yhuang-mobile.sh.intel.com ([10.238.5.184]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 19:34:47 -0700 From: Huang Ying To: Peter Zijlstra Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , "Matthew Wilcox (Oracle)" , Rafael Aquini , Andrew Morton , Ingo Molnar , Mel Gorman , Rik van Riel , Johannes Weiner , Dave Hansen , Andi Kleen , Michal Hocko , David Rientjes Subject: [PATCH -V2 1/2] mempolicy: Rename MPOL_F_MORON to MPOL_F_MOPRON Date: Wed, 28 Oct 2020 10:34:10 +0800 Message-Id: <20201028023411.15045-2-ying.huang@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201028023411.15045-1-ying.huang@intel.com> References: <20201028023411.15045-1-ying.huang@intel.com> MIME-Version: 1.0 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: To follow code-of-conduct better. Signed-off-by: "Huang, Ying" Suggested-by: "Matthew Wilcox (Oracle)" Acked-by: Rafael Aquini Cc: Andrew Morton Cc: Ingo Molnar Cc: Mel Gorman Cc: Rik van Riel Cc: Johannes Weiner Cc: Dave Hansen Cc: Andi Kleen Cc: Michal Hocko Cc: David Rientjes Cc: Rafael Aquini --- include/uapi/linux/mempolicy.h | 2 +- kernel/sched/debug.c | 2 +- mm/mempolicy.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/mempolicy.h b/include/uapi/linux/mempolicy.h index 3354774af61e..3c3666d017e6 100644 --- a/include/uapi/linux/mempolicy.h +++ b/include/uapi/linux/mempolicy.h @@ -60,7 +60,7 @@ enum { #define MPOL_F_SHARED (1 << 0) /* identify shared policies */ #define MPOL_F_LOCAL (1 << 1) /* preferred local allocation */ #define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */ -#define MPOL_F_MORON (1 << 4) /* Migrate On protnone Reference On Node */ +#define MPOL_F_MOPRON (1 << 4) /* Migrate On Protnone Reference On Node */ #endif /* _UAPI_LINUX_MEMPOLICY_H */ diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 0655524700d2..8bfb6adb3f31 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -898,7 +898,7 @@ static void sched_show_numa(struct task_struct *p, struct seq_file *m) task_lock(p); pol = p->mempolicy; - if (pol && !(pol->flags & MPOL_F_MORON)) + if (pol && !(pol->flags & MPOL_F_MOPRON)) pol = NULL; mpol_get(pol); task_unlock(p); diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 3fde772ef5ef..f6948b659643 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2511,7 +2511,7 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long } /* Migrate the page towards the node whose CPU is referencing it */ - if (pol->flags & MPOL_F_MORON) { + if (pol->flags & MPOL_F_MOPRON) { polnid = thisnid; if (!should_numa_migrate_memory(current, page, curnid, thiscpu)) @@ -2802,7 +2802,7 @@ void __init numa_policy_init(void) preferred_node_policy[nid] = (struct mempolicy) { .refcnt = ATOMIC_INIT(1), .mode = MPOL_PREFERRED, - .flags = MPOL_F_MOF | MPOL_F_MORON, + .flags = MPOL_F_MOF | MPOL_F_MOPRON, .v = { .preferred_node = nid, }, }; } @@ -3010,7 +3010,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) unsigned short mode = MPOL_DEFAULT; unsigned short flags = 0; - if (pol && pol != &default_policy && !(pol->flags & MPOL_F_MORON)) { + if (pol && pol != &default_policy && !(pol->flags & MPOL_F_MOPRON)) { mode = pol->mode; flags = pol->flags; }