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:	Mon, 17 Dec 2012 10:23:59 +0800
From:	Tang Chen <tangchen@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Wen Congyang <wency@...fujitsu.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Rob Landley <rob@...dley.net>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Mel Gorman <mgorman@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	Yinghai Lu <yinghai@...nel.org>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PART4 Patch v2 2/2] memory_hotplug: allow online/offline memory
 to result movable node

Hi Andrew,

So sorry for such a long delay. I missed this one.
Please check the attached patch if you still need it.
All comments are followed.

Thanks. :)

On 11/21/2012 06:29 AM, Andrew Morton wrote:
> On Fri, 16 Nov 2012 19:58:10 +0800
> Wen Congyang<wency@...fujitsu.com>  wrote:
>
>> From: Lai Jiangshan<laijs@...fujitsu.com>
>>
>> Now, memory management can handle movable node or nodes which don't have
>> any normal memory, so we can dynamic configure and add movable node by:
>> 	online a ZONE_MOVABLE memory from a previous offline node
>> 	offline the last normal memory which result a non-normal-memory-node
>>
>> movable-node is very important for power-saving,
>> hardware partitioning and high-available-system(hardware fault management).
>>
>> ...
>>
>> --- a/mm/memory_hotplug.c
>> +++ b/mm/memory_hotplug.c
>> @@ -589,11 +589,19 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
>>   	return 0;
>>   }
>>
>> +#ifdef CONFIG_MOVABLE_NODE
>> +/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
>
> The comment is hard to understand.  Should it read "When
> CONFIG_MOVABLE_NODE, we permit onlining of a node which doesn't have
> normal memory"?
>
>> +static bool can_online_high_movable(struct zone *zone)
>> +{
>> +	return true;
>> +}
>> +#else /* #ifdef CONFIG_MOVABLE_NODE */
>>   /* ensure every online node has NORMAL memory */
>>   static bool can_online_high_movable(struct zone *zone)
>>   {
>>   	return node_state(zone_to_nid(zone), N_NORMAL_MEMORY);
>>   }
>> +#endif /* #ifdef CONFIG_MOVABLE_NODE */
>>
>>   /* check which state of node_states will be changed when online memory */
>>   static void node_states_check_changes_online(unsigned long nr_pages,
>> @@ -1097,6 +1105,13 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
>>   	return offlined;
>>   }
>>
>> +#ifdef CONFIG_MOVABLE_NODE
>> +/* when CONFIG_MOVABLE_NODE, we allow online node don't have normal memory */
>
> Ditto, after replacing "online" with offlining".
>
>> +static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
>> +{
>> +	return true;
>> +}
>> +#else /* #ifdef CONFIG_MOVABLE_NODE */
>>   /* ensure the node has NORMAL memory if it is still online */
>>   static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
>>   {
>> @@ -1120,6 +1135,7 @@ static bool can_offline_normal(struct zone *zone, unsigned long nr_pages)
>>   	 */
>>   	return present_pages == 0;
>>   }
>> +#endif /* #ifdef CONFIG_MOVABLE_NODE */
>
> Please, spend more time over the accuracy and completeness of the
> changelog and comments?  That will result in better and more
> maintainable code.  And it results in *much* more effective code
> reviewing.
>
>
> --
> 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/
>


View attachment "0002-memory_hotplug-allow-online-offline-memory-to-result.patch" of type "text/x-patch" (3071 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ