Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbbFDNJN (ORCPT ); Thu, 4 Jun 2015 09:09:13 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:64904 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbbFDNJH (ORCPT ); Thu, 4 Jun 2015 09:09:07 -0400 Message-ID: <55704C9B.6010809@huawei.com> Date: Thu, 4 Jun 2015 21:03:23 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Xishi Qiu , Andrew Morton , , Yinghai Lu , "H. Peter Anvin" , Thomas Gleixner , , Xiexiuqi , Hanjun Guo , "Luck, Tony" CC: Linux MM , LKML Subject: [RFC PATCH 09/12] mm: enable allocate mirrored memory at boot time References: <55704A7E.5030507@huawei.com> In-Reply-To: <55704A7E.5030507@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 931 Lines: 35 Add a boot option called "mirrorable" to allocate mirrored memory at boot time (after bootmem free). Signed-off-by: Xishi Qiu --- mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 63b90ca..d4d2066 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -213,6 +213,13 @@ int user_min_free_kbytes = -1; #ifdef CONFIG_MEMORY_MIRROR struct mirror_info mirror_info; int sysctl_mirrorable = 0; + +static int __init set_mirrorable(char *p) +{ + sysctl_mirrorable = 1; + return 0; +} +early_param("mirrorable", set_mirrorable); #endif static unsigned long __meminitdata nr_kernel_pages; -- 2.0.0 -- 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/