From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdB0XdB (ORCPT ); Mon, 27 Feb 2017 18:33:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52988 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdB0Xc4 (ORCPT ); Mon, 27 Feb 2017 18:32:56 -0500 Date: Mon, 27 Feb 2017 11:28:52 -0600 From: Reza Arbab To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Greg KH , "K. Y. Srinivasan" , Vitaly Kuznetsov , David Rientjes , Daniel Kiper , linux-api@vger.kernel.org, LKML , linux-s390@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Michal Hocko Subject: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks References: <20170227092817.23571-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170227092817.23571-1-mhocko@kernel.org> Organization: IBM Linux Technology Center User-Agent: NeoMutt/20170225 (1.8.0) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022717-0016-0000-0000-0000064A34CF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006694; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000205; SDB=6.00827797; UDB=6.00405649; IPR=6.00605315; BA=6.00005174; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014461; XFM=3.00000011; UTC=2017-02-27 17:28:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022717-0017-0000-0000-000037C2E586 Message-Id: <20170227172852.t52egmv743fi26ds@arbab-laptop> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-27_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702270164 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 27, 2017 at 10:28:17AM +0100, Michal Hocko wrote: >diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h >index 134a2f69c21a..a72f7f64ee26 100644 >--- a/include/linux/memory_hotplug.h >+++ b/include/linux/memory_hotplug.h >@@ -100,8 +100,6 @@ extern void __online_page_free(struct page *page); > > extern int try_online_node(int nid); > >-extern bool memhp_auto_online; >- > #ifdef CONFIG_MEMORY_HOTREMOVE > extern bool is_pageblock_removable_nolock(struct page *page); > extern int arch_remove_memory(u64 start, u64 size); >@@ -272,7 +270,7 @@ static inline void remove_memory(int nid, u64 start, u64 size) {} > > extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn, > void *arg, int (*func)(struct memory_block *, void *)); >-extern int add_memory(int nid, u64 start, u64 size); >+extern int add_memory(int nid, u64 start, u64 size, bool online); > extern int add_memory_resource(int nid, struct resource *resource, bool online); > extern int zone_for_memory(int nid, u64 start, u64 size, int zone_default, > bool for_device); It would be nice if instead of a 'bool online' argument, add_memory() and add_memory_resource() took an 'int online_type', ala online_pages(). That way we could specify offline, online, online+movable, etc. -- Reza Arbab