Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755193AbdCaOQP (ORCPT ); Fri, 31 Mar 2017 10:16:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50124 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754688AbdCaOQN (ORCPT ); Fri, 31 Mar 2017 10:16:13 -0400 Date: Fri, 31 Mar 2017 15:16:04 +0100 From: Andrea Reale To: Florian Fainelli Cc: Scott Branden , Maciej Bielski , will.deacon@arm.com, linux-arm-kernel@lists.infradead.org, qiuxishi@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] Memory hotplug support for arm64 platform References: <1481717765-31186-1-git-send-email-m.bielski@virtualopensystems.com> <75156ea7-6e74-27e8-bf29-762f79151d23@broadcom.com> <7977063a-20bb-cc85-449f-51bb7d20761e@virtualopensystems.com> <6568a65d-79c0-6fe4-e4d0-f1d3fe205321@broadcom.com> <20170206111732.GA5589@samekh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17033114-0008-0000-0000-000004169A04 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033114-0009-0000-0000-00001D108A7F Message-Id: <20170331141603.GA1440@samekh> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-31_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703310129 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1550 Lines: 39 Hi Florian, thanks for your message. Please, find the replies in-line. On Wed, Mar 29, 2017 at 05:40:02PM -0700, Florian Fainelli wrote: > While the "hack" that sets/clears NOMAP in order for pfn_valid() to > return false/true when appropriate during __add_pages() definitively > does seem to work to probe the memory section, don't you also hit the > same warning when you try to online that memory section in > pages_correctly_reserved() once you have cleared the NOMAP flag? Before arch_add_memory returns, we clear the nomap flag on the blocks, so that pfn_valid will return true when executing on the corresponding pages. This means that the condition in pages_correctly_reserved in drivers/base/memory.c: if (WARN_ON_ONCE(!pfn_valid(pfn))) will evaluate to false, so no warning should be issued, and the function should continue to execute as expected. Is it that you were referring to or did I miss the point? > I will definitively give this a try on ARM64 since I need to get it > working there. Thanks a lot, any help in testing is really appreciated. > Do you mind posting a non-RFC patch? We should release the hot-remove code that myself and Maciej have been working on very soon (say, around one week); the plan is to rebase everything and release hot-add and hot-remove as a single patch series (including Scott's original patches and our hot-add patches). If you can wait until then, we will probably minimize entropy; otherwise we can also re-post the hot-add patches earlier and separately. Thanks and regards, Andrea