From patchwork Fri Jun 19 16:24:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 11614593 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 E273290 for ; Fri, 19 Jun 2020 16:24:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B9E5121707 for ; Fri, 19 Jun 2020 16:24:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9E5121707 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 151BE8D00D2; Fri, 19 Jun 2020 12:24:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0B5AA8D00D0; Fri, 19 Jun 2020 12:24:33 -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 E965A8D00D2; Fri, 19 Jun 2020 12:24:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id CC92D8D00D0 for ; Fri, 19 Jun 2020 12:24:32 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8AA5C180AD81A for ; Fri, 19 Jun 2020 16:24:32 +0000 (UTC) X-FDA: 76946484384.18.cream30_070a0e726e1a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 8D7C010085D5F for ; Fri, 19 Jun 2020 16:24:31 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,ben.widawsky@intel.com,,RULES_HIT:30029:30045:30054:30064,0,RBL:192.55.52.93:@intel.com:.lbl8.mailshell.net-62.50.0.100 64.95.201.95,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:23,LUA_SUMMARY:none X-HE-Tag: cream30_070a0e726e1a X-Filterd-Recvd-Size: 2969 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Fri, 19 Jun 2020 16:24:30 +0000 (UTC) IronPort-SDR: GVBsMXjing+fRwviMSEU0wjDGsec2jPQcLNlV9NAlwFp5kOmDvSpBkwMyQwiiim+nKFh776/sk 5wRQLXOfaYXA== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="141280134" X-IronPort-AV: E=Sophos;i="5.75,255,1589266800"; d="scan'208";a="141280134" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 09:24:28 -0700 IronPort-SDR: QK2r2izXYeI5Gb759ect1MLhaHAPPt7795R4t3jaLnhVuy1wnRp/dx6rd6PQLkXBTT16N/6FaQ o8WNxSAMH4IQ== X-IronPort-AV: E=Sophos;i="5.75,255,1589266800"; d="scan'208";a="264367918" Received: from sjiang-mobl2.ccr.corp.intel.com (HELO bwidawsk-mobl5.local) ([10.252.131.131]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 09:24:27 -0700 From: Ben Widawsky To: linux-mm Cc: Ben Widawsky , Christoph Lameter , Andrew Morton , David Rientjes Subject: [PATCH 01/18] mm/mempolicy: Add comment for missing LOCAL Date: Fri, 19 Jun 2020 09:24:08 -0700 Message-Id: <20200619162425.1052382-2-ben.widawsky@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619162425.1052382-1-ben.widawsky@intel.com> References: <20200619162425.1052382-1-ben.widawsky@intel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8D7C010085D5F X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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. Cc: Christoph Lameter Cc: Andrew Morton Cc: David Rientjes Signed-off-by: Ben Widawsky Acked-by: Michal Hocko --- mm/mempolicy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 381320671677..36ee3267c25f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -427,6 +427,7 @@ static const struct mempolicy_operations mpol_ops[MPOL_MAX] = { .create = mpol_new_bind, .rebind = mpol_rebind_nodemask, }, + /* MPOL_LOCAL is converted to MPOL_PREFERRED on policy creation */ }; static int migrate_page_add(struct page *page, struct list_head *pagelist,