Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752434AbbF2GxK (ORCPT ); Mon, 29 Jun 2015 02:53:10 -0400 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:31385 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbbF2GxD (ORCPT ); Mon, 29 Jun 2015 02:53:03 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 874258868317421bab268ae9914ec0bc Message-ID: <5590EAA9.5090104@jp.fujitsu.com> Date: Mon, 29 Jun 2015 15:50:17 +0900 From: Kamezawa Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Xishi Qiu , Andrew Morton , "H. Peter Anvin" , Ingo Molnar , "Luck, Tony" , Hanjun Guo , Xiexiuqi , leon@leon.nu, Dave Hansen , Naoya Horiguchi , Vlastimil Babka , Mel Gorman CC: Linux MM , LKML Subject: Re: [RFC v2 PATCH 1/8] mm: add a new config to manage the code References: <558E084A.60900@huawei.com> <558E0913.7020501@huawei.com> In-Reply-To: <558E0913.7020501@huawei.com> Content-Type: multipart/mixed; boundary="------------030208070301040603070806" X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3557 Lines: 110 This is a multi-part message in MIME format. --------------030208070301040603070806 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 2015/06/27 11:23, Xishi Qiu wrote: > This patch introduces a new config called "CONFIG_ACPI_MIRROR_MEMORY", set it CONFIG_MEMORY_MIRROR > off by default. > > Signed-off-by: Xishi Qiu > --- > mm/Kconfig | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 390214d..c40bb8b 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -200,6 +200,14 @@ config MEMORY_HOTREMOVE > depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE > depends on MIGRATION > > +config MEMORY_MIRROR In following patches, you use CONFIG_MEMORY_MIRROR. I think the name is too generic besides it's depends on ACPI. But I'm not sure address based memory mirror is planned in other platform. So, hmm. How about dividing the config into 2 parts like attached ? (just an example) Thanks, -Kame --------------030208070301040603070806 Content-Type: text/plain; charset=Shift_JIS; name="0001-add-a-new-config-option-for-memory-mirror.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-add-a-new-config-option-for-memory-mirror.patch" >From 88213b0f76e2f603c5a38690cbd85a4df1e646ba Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Mon, 29 Jun 2015 15:35:47 +0900 Subject: [PATCH] add a new config option for memory mirror Add a new config option "CONFIG_MEMORY_MIRROR" for kernel assisted memory mirroring. In UEFI2.5 spec, Address based memory mirror is defined and it allows the system to create partial memory mirror. The feature guards important(kernel) memory to be mirrored by using the address based memory mirror. Now this depends on cpu architecure Haswell? Broadwell? --- arch/x86/Kconfig | 6 ++++++ mm/Kconfig | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e33e01b..56f17df 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -596,6 +596,12 @@ config X86_SUPPORTS_MEMORY_FAILURE depends on X86_64 || !SPARSEMEM select ARCH_SUPPORTS_MEMORY_FAILURE +config X86_SUPPORTS_MEMORY_MIRROR + def_bool y + # UEFI 2.5spec. address based memory mirror, supported only after XXX + depends on X86_64 && ARCH_SUPPORTS_MEMORY_FAILURE + select ARCH_MEMORY_MIRROR + config STA2X11 bool "STA2X11 Companion Chip Support" depends on X86_32_NON_STANDARD && PCI diff --git a/mm/Kconfig b/mm/Kconfig index b3a60ee..e14dc2d 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -200,6 +200,15 @@ config MEMORY_HOTREMOVE depends on MEMORY_HOTPLUG && ARCH_ENABLE_MEMORY_HOTREMOVE depends on MIGRATION +config MEMORY_MIRROR + bool "Address range mirroring support" + depends on ARCH_MEMORY_MIRROR + default n + help + This feature allows the kernel to assist address based memory + mirror supported by architecture/firmware. And place some types + of memory (especially, kernel memory) placed into mirrored range. + # # If we have space for more page flags then we can enable additional # optimizations and functionality. -- 1.9.3 --------------030208070301040603070806-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/