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: Thu, 27 Jun 2024 22:47:49 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Tvrtko Ursulin <tursulin@...lia.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel-dev@...lia.com,
	Tvrtko Ursulin <tvrtko.ursulin@...lia.com>,
	Huang Ying <ying.huang@...el.com>, Mel Gorman <mgorman@...e.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Rik van Riel <riel@...riel.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Dave Hansen <dave.hansen@...el.com>,
	Andi Kleen <ak@...ux.intel.com>, Michal Hocko <mhocko@...e.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH] mm/numa_balancing: Teach mpol_to_str about the balancing
 mode

On Tue, Jun 25, 2024 at 02:26:05PM +0100, Tvrtko Ursulin wrote:
>  		/*
> -		 * Currently, the only defined flags are mutually exclusive
> +		 * The below two flags are mutually exclusive:
>  		 */
>  		if (flags & MPOL_F_STATIC_NODES)
>  			p += snprintf(p, buffer + maxlen - p, "static");
>  		else if (flags & MPOL_F_RELATIVE_NODES)
>  			p += snprintf(p, buffer + maxlen - p, "relative");
> +
> +		if (flags & MPOL_F_NUMA_BALANCING)
> +			p += snprintf(p, buffer + maxlen - p, "balancing");
>  	}

So if MPOL_F_STATIC_NODES and MPOL_F_NUMA_BALANCING are set, then we
get a string "staticbalancing"?  Is that intended?

Or are these three all mutually exclusive and that should have been
as "else if"?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ