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] [day] [month] [year] [list]
Date:	Fri, 17 Aug 2012 14:09:21 +0000
From:	Christoph Lameter <cl@...ux.com>
To:	Hanjun Guo <guohanjun@...wei.com>
cc:	Wu Jianguo <wujianguo@...wei.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	Tony Luck <tony.luck@...el.com>,
	Pekka Enberg <penberg@...nel.org>,
	Matt Mackall <mpm@...enic.com>, Mel Gorman <mgorman@...e.de>,
	Yinghai Lu <yinghai@...nel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	David Rientjes <rientjes@...gle.com>,
	Minchan Kim <minchan@...nel.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Jiang Liu <liuj97@...il.com>,
	qiuxishi <qiuxishi@...wei.com>
Subject: Re: [PATCH V2] mm: introduce N_LRU_MEMORY to distinguish between
 normal and movable memory

On Fri, 17 Aug 2012, Hanjun Guo wrote:

> N_NORMAL_MEMORY means non-LRU page allocs possible.

Hmmm... It may be better to say

N_NORMAL_MEMORY 	Allocations are allowed for pages that will not be
			managed via a LRU and that cannot be moved by the page migration logic.

N_LRU_MEMORY		Allocations are possible for pages that are managed via LRUs

N_HIGH_MEMORY		Allocations are allowed for pages that are only temporarliy mapped into kernel address space.

Any node that has the ability to allocate memory at all has at least N_LRU_MEMORY set.

>
>  /*
>   * Bitmasks that are kept for all the nodes.
> + * N_NORMAL_MEMORY means non-LRU page allocs possible.
> + * N_LRU_MEMORY means LRU page allocs possible,
> + * node with ZONE_DMA/ZONE_DMA32/ZONE_NORMAL is marked with
> + * N_LRU_MEMORY and N_NORMAL_MEMORY,
> + * node with ZONE_MOVABLE is *only* marked with N_LRU_MEMORY,
> + * node with ZONE_HIGHMEM is marked with N_LRU_MEMORY and N_HIGH_MEMORY.
> + * N_LRU_MEMORY also means node has any regular memory.
>   */
>  enum node_states {
>  	N_POSSIBLE,		/* The node could become online at some point */
>  	N_ONLINE,		/* The node is online */
> -	N_NORMAL_MEMORY,	/* The node has regular memory */
> +	N_NORMAL_MEMORY,	/* The node has normal memory */
> +	N_LRU_MEMORY,		/* The node has regular memory */

These comments are utter garbage and just repeat what the constant
alreadty expresses. . Please actually say something meaningful that
another developer can use when he attempts to understand what these bits
mean.

--
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