From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBFF2C4360F for ; Wed, 3 Apr 2019 13:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3D9F2084C for ; Wed, 3 Apr 2019 13:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbfDCNM2 (ORCPT ); Wed, 3 Apr 2019 09:12:28 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39912 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfDCNM2 (ORCPT ); Wed, 3 Apr 2019 09:12:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CEB58A78; Wed, 3 Apr 2019 06:12:27 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DCED23F59C; Wed, 3 Apr 2019 06:12:24 -0700 (PDT) Subject: Re: [PATCH 1/6] arm64/mm: Enable sysfs based memory hot add interface To: David Hildenbrand , Anshuman Khandual , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, akpm@linux-foundation.org, will.deacon@arm.com, catalin.marinas@arm.com Cc: mhocko@suse.com, mgorman@techsingularity.net, james.morse@arm.com, mark.rutland@arm.com, cpandya@codeaurora.org, arunks@codeaurora.org, dan.j.williams@intel.com, osalvador@suse.de, logang@deltatee.com, cai@lca.pw References: <1554265806-11501-1-git-send-email-anshuman.khandual@arm.com> <1554265806-11501-2-git-send-email-anshuman.khandual@arm.com> <4b9dd2b0-3b11-608c-1a40-9a3d203dd904@redhat.com> From: Robin Murphy Message-ID: Date: Wed, 3 Apr 2019 14:12:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <4b9dd2b0-3b11-608c-1a40-9a3d203dd904@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/04/2019 09:20, David Hildenbrand wrote: > On 03.04.19 06:30, Anshuman Khandual wrote: >> Sysfs memory probe interface (/sys/devices/system/memory/probe) can accept >> starting physical address of an entire memory block to be hot added into >> the kernel. This is in addition to the existing ACPI based interface. This >> just enables it with the required config CONFIG_ARCH_MEMORY_PROBE. >> > > We recently discussed that the similar interface for removal should > rather be moved to a debug/test module > > I wonder if we should try to do the same for the sysfs probing > interface. Rather try to get rid of it than open the doors for more users. Agreed - if this option even exists in a released kernel, there's a risk that distros will turn it on for the sake of it, and at that point arm64 is stuck carrying the same ABI baggage as well. If users turn up in future with a desperate and unavoidable need for the legacy half-an-API on arm64, we can always reconsider adding it at that point. It was very much deliberate that my original hot-add support did not include a patch like this one. Robin. >> Signed-off-by: Anshuman Khandual >> --- >> arch/arm64/Kconfig | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 7e34b9e..a2418fb 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -266,6 +266,15 @@ config HAVE_GENERIC_GUP >> config ARCH_ENABLE_MEMORY_HOTPLUG >> def_bool y >> >> +config ARCH_MEMORY_PROBE >> + bool "Enable /sys/devices/system/memory/probe interface" >> + depends on MEMORY_HOTPLUG >> + help >> + This option enables a sysfs /sys/devices/system/memory/probe >> + interface for testing. See Documentation/memory-hotplug.txt >> + for more information. If you are unsure how to answer this >> + question, answer N. >> + >> config SMP >> def_bool y >> >> > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F5FDC4360F for ; Wed, 3 Apr 2019 13:12:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D70F2084C for ; Wed, 3 Apr 2019 13:12:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CFoOrbH4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D70F2084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bkmT8Pt4O/R2qmh47MjpklmeyKHq2UKrT8B/hkIwa+k=; b=CFoOrbH4Jx4dWXHGvtkd2uceg L3Dd01awdlOswLzLxNmThP1GyRQ2A2/2wFb7LQrV3+QTjznZwwbE10LX2UOAqLA/SAYb4Obh6Cb/B 4ucLF/8zqzqgUEUPc7EVwNQLkg4KSnha0iDVEvvTFvD7igABd/lvOLh171ntejB7pJo73AWD55812 gmqri0M1POYurig6ixzJT7R+VjVzo+xEm15a4E903GBZwd9R4HeVzvMpo3KYt3vQqf3CuJqEPfPlm ZCw7ZooN3MvX/HLRJTAq8OdLgJTESzPFAwh8fq4BRdp0C9OXD26kg5ZwQOJEjNmi3GoYOB+3OcGBk VHBuUh6uA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBfgw-0004tA-NW; Wed, 03 Apr 2019 13:12:34 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBfgu-0004sV-A4 for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 13:12:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CEB58A78; Wed, 3 Apr 2019 06:12:27 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DCED23F59C; Wed, 3 Apr 2019 06:12:24 -0700 (PDT) Subject: Re: [PATCH 1/6] arm64/mm: Enable sysfs based memory hot add interface To: David Hildenbrand , Anshuman Khandual , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, akpm@linux-foundation.org, will.deacon@arm.com, catalin.marinas@arm.com References: <1554265806-11501-1-git-send-email-anshuman.khandual@arm.com> <1554265806-11501-2-git-send-email-anshuman.khandual@arm.com> <4b9dd2b0-3b11-608c-1a40-9a3d203dd904@redhat.com> From: Robin Murphy Message-ID: Date: Wed, 3 Apr 2019 14:12:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <4b9dd2b0-3b11-608c-1a40-9a3d203dd904@redhat.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_061232_356340_CDFE4FF9 X-CRM114-Status: GOOD ( 21.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, mhocko@suse.com, logang@deltatee.com, cai@lca.pw, james.morse@arm.com, cpandya@codeaurora.org, arunks@codeaurora.org, dan.j.williams@intel.com, mgorman@techsingularity.net, osalvador@suse.de Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/04/2019 09:20, David Hildenbrand wrote: > On 03.04.19 06:30, Anshuman Khandual wrote: >> Sysfs memory probe interface (/sys/devices/system/memory/probe) can accept >> starting physical address of an entire memory block to be hot added into >> the kernel. This is in addition to the existing ACPI based interface. This >> just enables it with the required config CONFIG_ARCH_MEMORY_PROBE. >> > > We recently discussed that the similar interface for removal should > rather be moved to a debug/test module > > I wonder if we should try to do the same for the sysfs probing > interface. Rather try to get rid of it than open the doors for more users. Agreed - if this option even exists in a released kernel, there's a risk that distros will turn it on for the sake of it, and at that point arm64 is stuck carrying the same ABI baggage as well. If users turn up in future with a desperate and unavoidable need for the legacy half-an-API on arm64, we can always reconsider adding it at that point. It was very much deliberate that my original hot-add support did not include a patch like this one. Robin. >> Signed-off-by: Anshuman Khandual >> --- >> arch/arm64/Kconfig | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 7e34b9e..a2418fb 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -266,6 +266,15 @@ config HAVE_GENERIC_GUP >> config ARCH_ENABLE_MEMORY_HOTPLUG >> def_bool y >> >> +config ARCH_MEMORY_PROBE >> + bool "Enable /sys/devices/system/memory/probe interface" >> + depends on MEMORY_HOTPLUG >> + help >> + This option enables a sysfs /sys/devices/system/memory/probe >> + interface for testing. See Documentation/memory-hotplug.txt >> + for more information. If you are unsure how to answer this >> + question, answer N. >> + >> config SMP >> def_bool y >> >> > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel