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=-12.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,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 84276C00A89 for ; Fri, 30 Oct 2020 19:02:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F3BFE221FA for ; Fri, 30 Oct 2020 19:02:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3BFE221FA 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 30AF36B005C; Fri, 30 Oct 2020 15:02:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29EA06B0062; Fri, 30 Oct 2020 15:02:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15A3B6B005D; Fri, 30 Oct 2020 15:02:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id D6C406B0036 for ; Fri, 30 Oct 2020 15:02:47 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 83ADE180AD811 for ; Fri, 30 Oct 2020 19:02:47 +0000 (UTC) X-FDA: 77429513574.03.cloud74_3d085c427298 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 5A58A28A4E8 for ; Fri, 30 Oct 2020 19:02:47 +0000 (UTC) X-HE-Tag: cloud74_3d085c427298 X-Filterd-Recvd-Size: 3051 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Fri, 30 Oct 2020 19:02:46 +0000 (UTC) IronPort-SDR: AwEk2q/g0JvhMy7DF8orL2VbcakBD4epRF//1eAj0BgwIyPxMWcFsr/ismLPrWxmbSAtd37ATl 0fO7D3coZWDQ== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="155629088" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="155629088" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 12:02:43 -0700 IronPort-SDR: 5YXUIAQv+McZhxTjcsBckey+vREkkHnN2xde3eKCPu6HB0BAma7fFwgOc9E23f46Aa+5yKFBMI tPe1edzpuM+Q== X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="537167643" Received: from kingelix-mobl.amr.corp.intel.com (HELO bwidawsk-mobl5.local) ([10.252.139.120]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 12:02:43 -0700 From: Ben Widawsky To: linux-mm , Andrew Morton Cc: Ben Widawsky , Dave Hansen , Michal Hocko , Michal Hocko , linux-kernel@vger.kernel.org Subject: [PATCH 01/12] mm/mempolicy: Add comment for missing LOCAL Date: Fri, 30 Oct 2020 12:02:27 -0700 Message-Id: <20201030190238.306764-2-ben.widawsky@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201030190238.306764-1-ben.widawsky@intel.com> References: <20201030190238.306764-1-ben.widawsky@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: MPOL_LOCAL is a bit weird because it is simply a different name for an existing behavior (preferred policy with no node mask). It has been this way since it was added here: commit 479e2802d09f ("mm: mempolicy: Make MPOL_LOCAL a real policy") It is so similar to MPOL_PREFERRED in fact that when the policy is created in mpol_new, the mode is set as PREFERRED, and an internal state representing LOCAL doesn't exist. To prevent future explorers from scratching their head as to why MPOL_LOCAL isn't defined in the mpol_ops table, add a small comment explaining the situations. v2: Change comment to refer to mpol_new (Michal) Link: https://lore.kernel.org/r/20200630212517.308045-2-ben.widawsky@inte= l.com Acked-by: Michal Hocko Signed-off-by: Ben Widawsky --- mm/mempolicy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 3fde772ef5ef..e24f0133ff1f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -427,6 +427,7 @@ static const struct mempolicy_operations mpol_ops[MPO= L_MAX] =3D { .create =3D mpol_new_bind, .rebind =3D mpol_rebind_nodemask, }, + /* [MPOL_LOCAL] - see mpol_new() */ }; =20 static int migrate_page_add(struct page *page, struct list_head *pagelis= t, --=20 2.29.2