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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8A0EBC25B76 for ; Wed, 5 Jun 2024 08:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+L3992TX7NtRBxkYdF9EVL1+H/S2g4zJwhpOHSM/4iA=; b=yiHA/2xcwl4Ra/ fWPmTg1pqRvGppXxJ19klGB0g8fSntUm7l8JlYYdN4RQr1VkeQuIpnRrAOg3EAHlbusXyQYnd/zkt Zopp9NY1sKI3OKe1PfQ8y5EeYSYKDaaDNATxDsmhIgcTBsymtpwlafUYVUvpESB0jxi3Z8wEcHE+j emNLxJQwEaleX05DOd+9XmuA6a+Q6J+e2+XJxKfnm6AOadcLR0it9APITKPrZm1n0McXKUVXXdJFi GRI01WolqxEtUfeojEesrXtTw5wva3ZFQUUpDHylTXco4B6F561WXw2VrAh+KAElF+w/AsUn0NCBd CKb+HhRDaVCJlpE6A+JA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sElax-000000055st-49MF; Wed, 05 Jun 2024 08:02:07 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sElau-000000055s3-20jz for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2024 08:02:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AA7F961263; Wed, 5 Jun 2024 08:02:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F021C4AF07; Wed, 5 Jun 2024 08:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717574523; bh=+tsIBWkMgCF8yjXjlHBxfYtu83pa8wEdvkTA6fDFLpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m5S+1lpcOONYokYZiWVbFO/wpXqXqVTh1KR9MGtlR7VARKjGaul+R66izeyV7nCMh YBuFj0Vszv2OUGP2sBhxHxe+QPzR2C83OrzFDnGBpA81D3wGlAXFTp1u7zoLlw0HWM 4ytkGbr+TmxqsTtiVCWFzcV7E8E3mkOUERE6W5Nv31qdIdayCpDECP2BXxv+8oDq5l nlVUDBK88Q04yodNso79PYXIN7mDn6amqfXM8xSrhxcM3SCYKQVPuQMrqFsRr8tKIQ KmMWoGEvkN2oGDVvd8UXKXgT5IbqPqJj8OMpixKmbe1AYhkQBTeqABlnt9JdmQx8bK +WIqYZMxfMmyA== Date: Wed, 5 Jun 2024 11:00:03 +0300 From: Mike Rapoport To: David Hildenbrand Cc: Jonathan Cameron , Dan Williams , linux-cxl@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , Andrew Morton , Will Deacon , Jia He , Mike Rapoport , linuxarm@huawei.com, catalin.marinas@arm.com, Anshuman.Khandual@arm.com, Yuquan Wang , Oscar Salvador , Lorenzo Pieralisi , James Morse Subject: Re: [RFC PATCH 8/8] HACK: mm: memory_hotplug: Drop memblock_phys_free() call in try_remove_memory() Message-ID: References: <20240529171236.32002-1-Jonathan.Cameron@huawei.com> <20240529171236.32002-9-Jonathan.Cameron@huawei.com> <92ea53c6-a93b-4ab8-8aec-7f88300576eb@redhat.com> <900bd9b6-a788-4c71-9b43-aff4855ba234@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <900bd9b6-a788-4c71-9b43-aff4855ba234@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240605_010204_824605_7CA82BCD X-CRM114-Status: GOOD ( 22.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 04, 2024 at 11:39:27AM +0200, David Hildenbrand wrote: > On 04.06.24 11:35, Mike Rapoport wrote: > > On Mon, Jun 03, 2024 at 10:53:03PM +0200, David Hildenbrand wrote: > > > On 03.06.24 12:43, Mike Rapoport wrote: > > > > On Mon, Jun 03, 2024 at 11:14:00AM +0200, David Hildenbrand wrote: > > > > > > > The commit that added memblock_free() at the first place (f9126ab9241f > > > > ("memory-hotplug: fix wrong edge when hot add a new node")) does not really > > > > describe why that was required :( > > > > > > > > But at a quick glance it looks completely spurious. > > > > > > There are more details [1] but I also did not figure out why the > > > memblock_free() was really required to resolve that issue. > > > > > > [1] https://marc.info/?l=linux-kernel&m=142961156129456&w=2 > > The tinkering with memblock there and in f9126ab9241f seem bogus in the > > context of memory hotplug on x86. > > > > I believe that dropping that memblock_phys_free() is right thing to do > > regardless of this series. There's no corresponding memblock_alloc() and it > > was added as part of a fix for hotunplug on x86 that anyway had memblock > > discarded at that point. > > So when we re-add that memory, we might have still ranges as "reserved". I don't see how anything can become reserved on the hotplug path unless hotplug is possible before mm_core_init(). There are no memblock_reserve() calls in memory_hotplug.c, no memblock allocations possible after mm is inited, and even if memblock_add() will need to allocate memory that will be done via slab. > It does sound weird, but you're the boss :) Nah, it's mm/memory_hotplug.c, so you are :) But I can send a patch anyway :) > -- > Cheers, > > David / dhildenb > -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel