All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben.widawsky@intel.com>
To: linux-mm <linux-mm@kvack.org>, linux-kernel@vger.kernel.org
Cc: Michal Hocko <mhocko@kernel.org>,
	Dave Hansen <dave.hansen@intel.com>,
	Ben Widawsky <ben.widawsky@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>
Subject: [PATCH 01/12] mm/mempolicy: Add comment for missing LOCAL
Date: Tue, 30 Jun 2020 14:25:06 -0700	[thread overview]
Message-ID: <20200630212517.308045-2-ben.widawsky@intel.com> (raw)
In-Reply-To: <20200630212517.308045-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)

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.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 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


  reply	other threads:[~2020-06-30 21:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 21:25 [PATCH v2 00/12] Introduced multi-preference mempolicy Ben Widawsky
2020-06-30 21:25 ` Ben Widawsky [this message]
2020-06-30 21:25 ` [PATCH 02/12] mm/mempolicy: convert single preferred_node to full nodemask Ben Widawsky
2020-06-30 21:25 ` [PATCH 03/12] mm/mempolicy: Add MPOL_PREFERRED_MANY for multiple preferred nodes Ben Widawsky
2020-06-30 21:25 ` [PATCH 04/12] mm/mempolicy: allow preferred code to take a nodemask Ben Widawsky
2020-07-02  9:15   ` [mm/mempolicy] 9586f666c8: Kernel_panic-not_syncing:stack-protector:Kernel_stack_is_corrupted_in:mpol_new_preferred kernel test robot
2020-06-30 21:25 ` [PATCH 05/12] mm/mempolicy: refactor rebind code for PREFERRED_MANY Ben Widawsky
2020-06-30 21:25 ` [PATCH 06/12] mm/mempolicy: kill v.preferred_nodes Ben Widawsky
2020-06-30 21:25 ` [PATCH 07/12] mm/mempolicy: handle MPOL_PREFERRED_MANY like BIND Ben Widawsky
2020-06-30 21:25 ` [PATCH 08/12] mm/mempolicy: Create a page allocator for policy Ben Widawsky
2020-06-30 21:25 ` [PATCH 09/12] mm/mempolicy: Thread allocation for many preferred Ben Widawsky
2020-06-30 21:25 ` [PATCH 10/12] mm/mempolicy: VMA " Ben Widawsky
2020-06-30 21:25 ` [PATCH 11/12] mm/mempolicy: huge-page " Ben Widawsky
2020-06-30 21:25 ` [PATCH 12/12] mm/mempolicy: Advertise new MPOL_PREFERRED_MANY Ben Widawsky
2020-10-30 19:02 [PATCH v2 RESEND 00/12] Introduced multi-preference mempolicy Ben Widawsky
2020-10-30 19:02 ` [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=20200630212517.308045-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 \
    --cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.