lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Jan 2014 15:31:32 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Mel Gorman <mgorman@...e.de>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [patch for-3.14] mm, mempolicy: fix mempolicy printing in
 numa_maps

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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ