From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbdJTJex (ORCPT ); Fri, 20 Oct 2017 05:34:53 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:37393 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752421AbdJTJew (ORCPT ); Fri, 20 Oct 2017 05:34:52 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29412134" Date: Fri, 20 Oct 2017 17:34:22 +0800 From: Chao Fan To: Dou Liyang CC: , , , , , , , , Subject: Re: [PATCH 1/4] kaslr: parse the extended movable_node=nn[KMG]@ss[KMG] Message-ID: <20171020093421.GF5635@localhost.localdomain> 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> <804f8a19-f005-f6a5-0cf4-bd191ff01d37@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <804f8a19-f005-f6a5-0cf4-bd191ff01d37@cn.fujitsu.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [10.167.225.56] X-yoursite-MailScanner-ID: E59A347F13D5.AB253 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: fanc.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2017 at 01:33:16PM +0800, Dou Liyang wrote: >[...] >> > > > > >> > > > > +#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..." > Yes, you are right. I thought users will specify the regions like this: movable_node=1G@2G,1G@4G If users want to use movable_node=1G@2G movable_node=1G@4G Your suggestion is helpful and I will update it. Thanks, Chao Fan >then, you will find the problem of you code. > >Thanks, > dou