From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbdJTFdX (ORCPT ); Fri, 20 Oct 2017 01:33:23 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:34894 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750752AbdJTFdW (ORCPT ); Fri, 20 Oct 2017 01:33:22 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29404210" Subject: Re: [PATCH 1/4] kaslr: parse the extended movable_node=nn[KMG]@ss[KMG] To: Chao Fan References: <20171019100243.25259-1-fanc.fnst@cn.fujitsu.com> <20171019100243.25259-2-fanc.fnst@cn.fujitsu.com> <5e20f27e-5658-5d0c-4cb2-41b39124a0d6@cn.fujitsu.com> <20171020032202.GA5635@localhost.localdomain> <0fe05bd2-1155-0016-9de7-688812f9dc00@cn.fujitsu.com> <20171020034421.GC5635@localhost.localdomain> CC: , , , , , , , , From: Dou Liyang Message-ID: <804f8a19-f005-f6a5-0cf4-bd191ff01d37@cn.fujitsu.com> Date: Fri, 20 Oct 2017 13:33:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171020034421.GC5635@localhost.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: 8388948029C1.A8495 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] >>>>> >>>>> +#ifdef CONFIG_MEMORY_HOTPLUG >>>>> +static void mem_mark_immovable(char *str) >>>>> +{ >>>>> + int i = 0; >>>>> + >>>> >>>> you have use num_immovable_region, 'i' is useless. just remove it. >>> >>> Using num_immovable_region makes code too long. Using i will be >>> clear and make sure shoter than 80 characters. >> >> Oh, God, that's horrific. Did you find that your code is wrong? >> >> num_immovable_region will be reset each time. > > Did you test? > you can try with more than one movable_node, eg: "...movable_node=128G@128G movable_node=128G@256G..." then, you will find the problem of you code. Thanks, dou