From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by kanga.kvack.org (Postfix) with ESMTP id CE15F900016 for ; Thu, 4 Jun 2015 09:14:39 -0400 (EDT) Received: by obbgp2 with SMTP id gp2so9732704obb.2 for ; Thu, 04 Jun 2015 06:14:39 -0700 (PDT) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com. [119.145.14.65]) by mx.google.com with ESMTPS id j184si1622657oig.140.2015.06.04.06.14.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Jun 2015 06:14:39 -0700 (PDT) Message-ID: <55704C9B.6010809@huawei.com> Date: Thu, 4 Jun 2015 21:03:23 +0800 From: Xishi Qiu MIME-Version: 1.0 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 Sender: owner-linux-mm@kvack.org List-ID: To: Xishi Qiu , Andrew Morton , nao.horiguchi@gmail.com, Yinghai Lu , "H. Peter Anvin" , Thomas Gleixner , mingo@elte.hu, Xiexiuqi , Hanjun Guo , "Luck, Tony" Cc: Linux MM , LKML 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, 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: (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 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