From: David Rientjes <rientjes@google.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch for-3.14] mm, mempolicy: fix mempolicy printing in numa_maps
Date: Mon, 27 Jan 2014 15:31:32 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.02.1401271526010.17114@chino.kir.corp.google.com> (raw)
In-Reply-To: <20140127110330.GH4963@suse.de>
On Mon, 27 Jan 2014, Mel Gorman wrote:
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index c2ccec0..c1a2573 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -120,6 +120,14 @@ static struct mempolicy default_policy = {
>
> static struct mempolicy preferred_node_policy[MAX_NUMNODES];
>
> +/* Returns true if the policy is the default policy */
> +static bool mpol_is_default(struct mempolicy *pol)
> +{
> + return !pol ||
> + pol == &default_policy ||
> + pol == &preferred_node_policy[numa_node_id()];
> +}
> +
> static struct mempolicy *get_task_policy(struct task_struct *p)
> {
> struct mempolicy *pol = p->mempolicy;
I was trying to avoid doing this because numa_node_id() of process A
reading numa_maps for process B has nothing to do with the policy of the
process A and I thought MPOL_F_MORON's purpose was exactly for what it is
used for today. It works today since you initialize preferred_node_policy
for all nodes, but could this ever change to only be valid for N_MEMORY
node states, for example?
I'm not sure what the harm in updating mpol_to_str() would be if
MPOL_F_MORON is to change in the future?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-01-27 23:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 3:12 David Rientjes
2014-01-27 10:50 ` Peter Zijlstra
2014-01-27 13:09 ` Mel Gorman
2014-01-28 0:13 ` David Rientjes
2014-01-27 11:03 ` Mel Gorman
2014-01-27 23:31 ` David Rientjes [this message]
2014-01-28 8:57 ` Mel Gorman
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=alpine.DEB.2.02.1401271526010.17114@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
/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