From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 D591AC56202 for ; Fri, 30 Oct 2020 07:27:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D0CB221E2 for ; Fri, 30 Oct 2020 07:27:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D0CB221E2 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 A76676B005C; Fri, 30 Oct 2020 03:27:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A26206B005D; Fri, 30 Oct 2020 03:27:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C5FD6B0062; Fri, 30 Oct 2020 03:27:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 5F2CD6B005C for ; Fri, 30 Oct 2020 03:27:58 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 00929180AD804 for ; Fri, 30 Oct 2020 07:27:57 +0000 (UTC) X-FDA: 77427762636.30.desk18_1e17e4c27294 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id DACF1180B3C85 for ; Fri, 30 Oct 2020 07:27:57 +0000 (UTC) X-HE-Tag: desk18_1e17e4c27294 X-Filterd-Recvd-Size: 6252 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Fri, 30 Oct 2020 07:27:56 +0000 (UTC) IronPort-SDR: z9ih/hSawfHP6eH5BC4s/ezxvA8slPnwQNLBgkRWLMWhk7xW51QnzXB/UQNQJHG2uWLXOoTCs4 4C5KKD2A+Q8A== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="168701527" X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="168701527" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 00:27:55 -0700 IronPort-SDR: pI5j+anJbHbX5tSuB+HWmUKVyY+Vg2pu4M0vxMSvvHSBgGOl/h0yBzkllmIegU5jtWqgrSmKyB ZR9OmC4LPeRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="319237011" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.65]) by orsmga003.jf.intel.com with ESMTP; 30 Oct 2020 00:27:51 -0700 From: "Huang\, Ying" To: Michal Hocko Cc: Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Matthew Wilcox \(Oracle\)" , Rafael Aquini , Andrew Morton , Ingo Molnar , Mel Gorman , Rik van Riel , Johannes Weiner , Dave Hansen , Andi Kleen , David Rientjes Subject: Re: [PATCH -V2 1/2] mempolicy: Rename MPOL_F_MORON to MPOL_F_MOPRON References: <20201028023411.15045-1-ying.huang@intel.com> <20201028023411.15045-2-ying.huang@intel.com> <20201029090421.GC17500@dhcp22.suse.cz> Date: Fri, 30 Oct 2020 15:27:51 +0800 In-Reply-To: <20201029090421.GC17500@dhcp22.suse.cz> (Michal Hocko's message of "Thu, 29 Oct 2020 10:04:21 +0100") Message-ID: <87h7qcxjew.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii 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: Michal Hocko writes: > On Wed 28-10-20 10:34:10, Huang Ying wrote: >> To follow code-of-conduct better. > > This is changing a user visible interface and any userspace which refers > to the existing name will fail to compile unless I am missing something. Although these flags are put in uapi, I found these flags are actually internal flags used in "flags" field of struct mempolicy, they are never used as flags for any user space API. I guess they are placed in uapi header file to guarantee they aren't conflict with MPOL_MODE_FLAGS. > Have you checked how many applications would be affected? Based on above analysis, I think there is no application that will be affected. > Btw I find "follow CoC better" a very weak argument without further > explanation. That is the only reason for the patch. If nobody thinks the change is necessary, I can just drop the patch. Best Regards, Huang, Ying >> 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; >> } >> -- >> 2.28.0 >>