linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Widawsky <ben.widawsky@intel.com>
To: linux-mm <linux-mm@kvack.org>, Andrew Morton <akpm@linux-foundation.org>
Cc: Ben Widawsky <ben.widawsky@intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Michal Hocko <mhocko@kernel.org>, Michal Hocko <mhocko@suse.com>,
	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	[thread overview]
Message-ID: <20201030190238.306764-2-ben.widawsky@intel.com> (raw)
In-Reply-To: <20201030190238.306764-1-ben.widawsky@intel.com>

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@intel.com
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 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[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.29.2


       reply	other threads:[~2020-10-30 19:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201030190238.306764-1-ben.widawsky@intel.com>
2020-10-30 19:02 ` Ben Widawsky [this message]
2020-10-30 19:02 ` [PATCH 02/12] mm/mempolicy: convert single preferred_node to full nodemask Ben Widawsky
2020-10-30 19:02 ` [PATCH 03/12] mm/mempolicy: Add MPOL_PREFERRED_MANY for multiple preferred nodes Ben Widawsky
2020-10-30 19:02 ` [PATCH 04/12] mm/mempolicy: allow preferred code to take a nodemask Ben Widawsky
2021-01-03 13:34   ` [mm/mempolicy] 5ef9c2a53c: Kernel_panic-not_syncing:stack-protector:Kernel_stack_is_corrupted_in:mpol_new_preferred kernel test robot
2020-10-30 19:02 ` [PATCH 05/12] mm/mempolicy: refactor rebind code for PREFERRED_MANY Ben Widawsky
2020-10-30 19:02 ` [PATCH 06/12] mm/mempolicy: kill v.preferred_nodes Ben Widawsky
2020-10-30 19:02 ` [PATCH 07/12] mm/mempolicy: handle MPOL_PREFERRED_MANY like BIND Ben Widawsky
2020-10-30 19:02 ` [PATCH 08/12] mm/mempolicy: Create a page allocator for policy Ben Widawsky
2020-10-30 19:02 ` [PATCH 09/12] mm/mempolicy: Thread allocation for many preferred Ben Widawsky
2020-10-30 19:02 ` [PATCH 10/12] mm/mempolicy: VMA " Ben Widawsky
2020-10-30 19:02 ` [PATCH 11/12] mm/mempolicy: huge-page " Ben Widawsky
2020-10-30 19:02 ` [PATCH 12/12] mm/mempolicy: Advertise new MPOL_PREFERRED_MANY Ben Widawsky
2020-06-30 21:25 [PATCH v2 00/12] Introduced multi-preference mempolicy Ben Widawsky
2020-06-30 21:25 ` [PATCH 01/12] mm/mempolicy: Add comment for missing LOCAL Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030190238.306764-2-ben.widawsky@intel.com \
    --to=ben.widawsky@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).