Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp73926ybt; Tue, 30 Jun 2020 15:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyASfxKZ8c2ZRHw+zN8QeNW+gYgZrTkWrpZcMcqDzqJxwPV5GGVkpSi/pwWTRVJotxPkqpA X-Received: by 2002:aa7:d142:: with SMTP id r2mr18604884edo.211.1593554527848; Tue, 30 Jun 2020 15:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593554527; cv=none; d=google.com; s=arc-20160816; b=sMA5sIu5gRbjvuOzca4gQj7MtA/I3FPPXqIGY4r2WrkAJxiO/9JURslC8PDuFff9+l c13qpS+k7e9xqHGQXcmzZyxQyRrdwClG9T27rr6RTweSag9gf6uW/vbAIfFolZI0zqIC MHLaDBYn7p2u48TXaDpTqpWwMqJk20lka8hI2JQqC6b8T0AiWS5hr9lK1RzWOGMcfykE ujo5KTi0gSknysbYSonTd8q80jFvCL+lXbeb13gegvnMYS5DxS1qqFYo/OUgfl4bKrXD abZygMjMcxDr0C6ZF4psaG3AIMY0T+BmmV9qEuGqEyTMDl/q4fVhxD0ifo3WZRGf5eRj s/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=7tMnyTtPO45vvTA9k9w12CTRbMqZEe0MUXVO+uPsqmU=; b=k1XtrwUgXu5bvzZQ2Tu4HXd0eQ5aOsNadd9oZQWdcW5uB9Ju2W/P5ZwOi+yz2RH4T6 KQPE5w8M12pXHs94iBrjX8E1k1mqSfIAB+7xFNZnvgpu1OqN/AlzZhT1bjsVfFKnnvyo VxFWxYcv9A8e2L+Cumiun4+5RW2Nferq3rKOq6+u5pR1lylFnTD35fCgUIj8RJEUiS+E BAQmIs6q6Wm4RpX5EM5DGlvIe3+o7ojx9aoPRnbcXtJtJD0i94wTNgpRVmnbioiapV8g IrNjeIJztPMZnqyM84mJkPMoZIWCxhQFdezf0jSmYg6sAXcIHxhXmn2lKtTlhAtQ3Z68 j69w== 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 i3si2053359ejk.97.2020.06.30.15.01.42; Tue, 30 Jun 2020 15:02:07 -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 S1730092AbgF3VZY (ORCPT + 99 others); Tue, 30 Jun 2020 17:25:24 -0400 Received: from mga02.intel.com ([134.134.136.20]:43377 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728878AbgF3VZX (ORCPT ); Tue, 30 Jun 2020 17:25:23 -0400 IronPort-SDR: uehVox3YyWQEVPpZFOJpg9JX/4qfra9tPpx2wNDqo9QXG198LsJu/v+F9bYoKtDL8e1rhnE0Nt wHHs70GIRvOQ== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="134676810" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="134676810" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 14:25:22 -0700 IronPort-SDR: Ov0YaenJERyHlKrRWV9cIrfOzL1LUSY/DeDfkMZ/AHGcvyfsEPHB1EGkCWR3iFPNnFpnA+J2DR T/N2chdpCZWg== X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="481336251" Received: from schittin-mobl.amr.corp.intel.com (HELO bwidawsk-mobl5.local) ([10.252.132.42]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 14:25:21 -0700 From: Ben Widawsky To: linux-mm , linux-kernel@vger.kernel.org Cc: Michal Hocko , Dave Hansen , Ben Widawsky , Andrew Morton , David Rientjes , Michal Hocko Subject: [PATCH 01/12] mm/mempolicy: Add comment for missing LOCAL Date: Tue, 30 Jun 2020 14:25:06 -0700 Message-Id: <20200630212517.308045-2-ben.widawsky@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630212517.308045-1-ben.widawsky@intel.com> References: <20200630212517.308045-1-ben.widawsky@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) Cc: Andrew Morton Cc: David Rientjes 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 381320671677..bde193278301 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] - see mpol_new() */ }; static int migrate_page_add(struct page *page, struct list_head *pagelist, -- 2.27.0