From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhang Yanfei Subject: Re: [PATCH part1 v6 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up Date: Fri, 11 Oct 2013 13:47:16 +0800 Message-ID: <525790E4.3060806@cn.fujitsu.com> References: <524E2032.4020106@gmail.com> <524E2127.4090904@gmail.com> <5251F9AB.6000203@zytor.com> <525442A4.9060709@gmail.com> <20131009164449.GG22495@htj.dyndns.org> <20131009192356.GB5592@mtj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org To: Yinghai Lu Cc: Tejun Heo , Andrew Morton , "H. Peter Anvin" , Ingo Molnar , Zhang Yanfei , "Rafael J . Wysocki" , Len Brown , Thomas Gleixner , Toshi Kani , Wanpeng Li , Thomas Renninger , Jiang Liu , Wen Congyang , Lai Jiangshan , Yasuaki Ishimatsu , Taku Izumi , Mel Gorman , Minchan Kim , "mina86@mina86.com" , "gong.chen@linux.intel.com" , Vasilis Liaskovitis List-Id: linux-acpi@vger.kernel.org Hello yinghai, I know your opinion but take code modification as an example seems like it doesn't stand. More code doesn't mean more complexity...... On 10/11/2013 01:27 PM, Yinghai Lu wrote: > On Wed, Oct 9, 2013 at 12:23 PM, Tejun Heo wrote: >> Hello, Yinghai. >> >> On Wed, Oct 09, 2013 at 12:10:34PM -0700, Yinghai Lu wrote: >>>> I still feel quite uneasy about pulling SRAT parsing and ACPI initrd >>>> overriding into early boot. >>> >>> for your reconsidering to parse srat early, I refresh that old patchset >>> at >>> >>> https://git.kernel.org/cgit/linux/kernel/git/yinghai/linux-yinghai.git/log/?h=for-x86-mm-3.13 >>> >>> actually looks one-third or haf patches already have your ack. >> >> Yes, but those acks assume that the overall approach is a good idea. >> The biggest issue that I have with the approach is that it is invasive >> and modifies basic structure for an inherently kludgy solution for a >> quite niche problem. The benefit / cost ratio still seems quite off >> to me - we're making a lot of general changes to serve something very >> specialized, which might not even stay relevant for long time. >> > > I really hate adding another the code path. > > Now with v7 from Yanfei, will have movable_node boot command parameter and > if that is specified kernel would allocate ram early in different way. > > Parse srat early patchset add about 217 lines, (from x86, ACPI, NUMA, > ia64: split SLIT handling out) > > arch/ia64/kernel/setup.c | 4 +- > arch/x86/include/asm/acpi.h | 3 +- > arch/x86/include/asm/page_types.h | 2 +- > arch/x86/include/asm/pgtable.h | 2 +- > arch/x86/include/asm/setup.h | 9 ++ > arch/x86/kernel/head64.c | 2 + > arch/x86/kernel/head_32.S | 4 + > arch/x86/kernel/microcode_intel_early.c | 8 +- > arch/x86/kernel/setup.c | 86 ++++++----- > arch/x86/mm/init.c | 101 ++++++++----- > arch/x86/mm/numa.c | 244 +++++++++++++++++++++++++------- > arch/x86/mm/numa_emulation.c | 2 +- > arch/x86/mm/numa_internal.h | 2 + > arch/x86/mm/srat.c | 11 +- > drivers/acpi/numa.c | 13 +- > drivers/acpi/osl.c | 131 ++++++++++++----- > include/linux/acpi.h | 20 +-- > include/linux/mm.h | 3 - > mm/page_alloc.c | 52 +------ > 19 files changed, 458 insertions(+), 241 deletions(-) > > if I drop last two, aka does not allocate page table on local code. > will only keep page table on first node, will only need to have add 137 lines. > > arch/ia64/kernel/setup.c | 4 +- > arch/x86/include/asm/acpi.h | 3 +- > arch/x86/include/asm/page_types.h | 2 +- > arch/x86/include/asm/setup.h | 9 ++ > arch/x86/kernel/head64.c | 2 + > arch/x86/kernel/head_32.S | 4 + > arch/x86/kernel/microcode_intel_early.c | 8 +- > arch/x86/kernel/setup.c | 85 +++++++++------ > arch/x86/mm/init.c | 10 +- > arch/x86/mm/numa.c | 188 +++++++++++++++++++++++--------- > arch/x86/mm/numa_emulation.c | 2 +- > arch/x86/mm/numa_internal.h | 2 + > arch/x86/mm/srat.c | 11 +- > drivers/acpi/numa.c | 13 ++- > drivers/acpi/osl.c | 131 +++++++++++++++------- > include/linux/acpi.h | 20 ++-- > include/linux/mm.h | 3 - > mm/page_alloc.c | 52 +-------- > 18 files changed, 343 insertions(+), 206 deletions(-) > > and Yanfei's add about 265 lines > > Documentation/kernel- > parameters.txt | 3 + > arch/x86/kernel/setup.c | 9 ++- > arch/x86/mm/init.c | 122 ++++++++++++++++++++++++++++------ > arch/x86/mm/numa.c | 11 +++ > include/linux/memblock.h | 24 +++++++ > include/linux/mm.h | 4 + > mm/Kconfig | 17 +++-- > mm/memblock.c | 126 +++++++++++++++++++++++++++++++---- > mm/memory_hotplug.c | 31 +++++++++ > 9 files changed, 306 insertions(+), 41 deletions(-) > > For long term to keep the code more maintainable, We really should go > though parse srat table early. > > Thanks > > Yinghai > -- Thanks. Zhang Yanfei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by kanga.kvack.org (Postfix) with ESMTP id CA1D86B0031 for ; Fri, 11 Oct 2013 01:48:39 -0400 (EDT) Received: by mail-pa0-f49.google.com with SMTP id ld10so3856711pab.36 for ; Thu, 10 Oct 2013 22:48:39 -0700 (PDT) Message-ID: <525790E4.3060806@cn.fujitsu.com> Date: Fri, 11 Oct 2013 13:47:16 +0800 From: Zhang Yanfei MIME-Version: 1.0 Subject: Re: [PATCH part1 v6 4/6] x86/mem-hotplug: Support initialize page tables in bottom-up References: <524E2032.4020106@gmail.com> <524E2127.4090904@gmail.com> <5251F9AB.6000203@zytor.com> <525442A4.9060709@gmail.com> <20131009164449.GG22495@htj.dyndns.org> <20131009192356.GB5592@mtj.dyndns.org> In-Reply-To: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Yinghai Lu Cc: Tejun Heo , Andrew Morton , "H. Peter Anvin" , Ingo Molnar , Zhang Yanfei , "Rafael J . Wysocki" , Len Brown , Thomas Gleixner , Toshi Kani , Wanpeng Li , Thomas Renninger , Jiang Liu , Wen Congyang , Lai Jiangshan , Yasuaki Ishimatsu , Taku Izumi , Mel Gorman , Minchan Kim , "mina86@mina86.com" , "gong.chen@linux.intel.com" , Vasilis Liaskovitis , "lwoodman@redhat.com" , Rik van Riel , "jweiner@redhat.com" , Prarit Bhargava , "x86@kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux MM , ACPI Devel Maling List , Chen Tang , Tang Chen Hello yinghai, I know your opinion but take code modification as an example seems like it doesn't stand. More code doesn't mean more complexity...... On 10/11/2013 01:27 PM, Yinghai Lu wrote: > On Wed, Oct 9, 2013 at 12:23 PM, Tejun Heo wrote: >> Hello, Yinghai. >> >> On Wed, Oct 09, 2013 at 12:10:34PM -0700, Yinghai Lu wrote: >>>> I still feel quite uneasy about pulling SRAT parsing and ACPI initrd >>>> overriding into early boot. >>> >>> for your reconsidering to parse srat early, I refresh that old patchset >>> at >>> >>> https://git.kernel.org/cgit/linux/kernel/git/yinghai/linux-yinghai.git/log/?h=for-x86-mm-3.13 >>> >>> actually looks one-third or haf patches already have your ack. >> >> Yes, but those acks assume that the overall approach is a good idea. >> The biggest issue that I have with the approach is that it is invasive >> and modifies basic structure for an inherently kludgy solution for a >> quite niche problem. The benefit / cost ratio still seems quite off >> to me - we're making a lot of general changes to serve something very >> specialized, which might not even stay relevant for long time. >> > > I really hate adding another the code path. > > Now with v7 from Yanfei, will have movable_node boot command parameter and > if that is specified kernel would allocate ram early in different way. > > Parse srat early patchset add about 217 lines, (from x86, ACPI, NUMA, > ia64: split SLIT handling out) > > arch/ia64/kernel/setup.c | 4 +- > arch/x86/include/asm/acpi.h | 3 +- > arch/x86/include/asm/page_types.h | 2 +- > arch/x86/include/asm/pgtable.h | 2 +- > arch/x86/include/asm/setup.h | 9 ++ > arch/x86/kernel/head64.c | 2 + > arch/x86/kernel/head_32.S | 4 + > arch/x86/kernel/microcode_intel_early.c | 8 +- > arch/x86/kernel/setup.c | 86 ++++++----- > arch/x86/mm/init.c | 101 ++++++++----- > arch/x86/mm/numa.c | 244 +++++++++++++++++++++++++------- > arch/x86/mm/numa_emulation.c | 2 +- > arch/x86/mm/numa_internal.h | 2 + > arch/x86/mm/srat.c | 11 +- > drivers/acpi/numa.c | 13 +- > drivers/acpi/osl.c | 131 ++++++++++++----- > include/linux/acpi.h | 20 +-- > include/linux/mm.h | 3 - > mm/page_alloc.c | 52 +------ > 19 files changed, 458 insertions(+), 241 deletions(-) > > if I drop last two, aka does not allocate page table on local code. > will only keep page table on first node, will only need to have add 137 lines. > > arch/ia64/kernel/setup.c | 4 +- > arch/x86/include/asm/acpi.h | 3 +- > arch/x86/include/asm/page_types.h | 2 +- > arch/x86/include/asm/setup.h | 9 ++ > arch/x86/kernel/head64.c | 2 + > arch/x86/kernel/head_32.S | 4 + > arch/x86/kernel/microcode_intel_early.c | 8 +- > arch/x86/kernel/setup.c | 85 +++++++++------ > arch/x86/mm/init.c | 10 +- > arch/x86/mm/numa.c | 188 +++++++++++++++++++++++--------- > arch/x86/mm/numa_emulation.c | 2 +- > arch/x86/mm/numa_internal.h | 2 + > arch/x86/mm/srat.c | 11 +- > drivers/acpi/numa.c | 13 ++- > drivers/acpi/osl.c | 131 +++++++++++++++------- > include/linux/acpi.h | 20 ++-- > include/linux/mm.h | 3 - > mm/page_alloc.c | 52 +-------- > 18 files changed, 343 insertions(+), 206 deletions(-) > > and Yanfei's add about 265 lines > > Documentation/kernel- > parameters.txt | 3 + > arch/x86/kernel/setup.c | 9 ++- > arch/x86/mm/init.c | 122 ++++++++++++++++++++++++++++------ > arch/x86/mm/numa.c | 11 +++ > include/linux/memblock.h | 24 +++++++ > include/linux/mm.h | 4 + > mm/Kconfig | 17 +++-- > mm/memblock.c | 126 +++++++++++++++++++++++++++++++---- > mm/memory_hotplug.c | 31 +++++++++ > 9 files changed, 306 insertions(+), 41 deletions(-) > > For long term to keep the code more maintainable, We really should go > though parse srat table early. > > Thanks > > Yinghai > -- Thanks. Zhang Yanfei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org