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=-5.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 C1B76C433E0 for ; Thu, 11 Mar 2021 09:34:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 2B0EB64F95 for ; Thu, 11 Mar 2021 09:34:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B0EB64F95 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; 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=loH8hidNPaGxkRMJXHVVRSB9oX3xaqL5Ec5x30jIicQ=; b=FkR6dHf4DUIH0oqq13Wp2DUol 9MB/ssIdsojl7vcwkBFtGw5k4OtQbY4wxOe/nZoRcIpNqcpGfv6PW+r7WHozKnMfjALkO9nK/XLgQ OlBpX71ABAkRVaEquHg6rd3E3xD6JOUOewE6A55zmw1Me6tn9C15MpfJnsJSjoW/jpGsboabnsTn1 q1IyWsAGbnU0k4WIn045oOmo2DN57EMOQhDvUMQaAy++VRMS5TIOmrasagpISsx9w9/bmIW6+NLmu PYXYaQSYY1CeSomjP40+4p1S4i0pGNef2tfFTo7b8LCHlUa/JZhZQ/ZAghMMZa//yV9zO+60kDBwy 3tHP7F9fA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKHgv-008lM4-56; Thu, 11 Mar 2021 09:33:13 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKHgr-008lLO-Dk for linux-arm-kernel@lists.infradead.org; Thu, 11 Mar 2021 09:33:11 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 071E164F4D; Thu, 11 Mar 2021 09:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615455187; bh=dh01iKnMh12GRgQjnoaGZLEPlCzGpVYYPsx3ni+tdT0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D96/AvS+OpjlahZ4Rje/9KkDOawCIc0aRIuvfE2mBz8unqx2BWZao4vYZdnCKR3cC Mqds9QGdhCfbaVkOtbk1ObIxlHAXBFvNTeWBMuiYsOpexnpb3CO4fKMdNYCqYPzc+m GbwuMx/9zeMNzyxyON8bcyAKno/+Xv4x7VYpLZ6qaWduG+AC3fSZoyJeB/gFhbRwuh 72Ibx0EOUjzvcy4EMYuOdrUhpmx+dZcF6wFzOROxE41Ot8Gc+43RgcVTCLHi01BFKc d0Q3SDeNFb9OF6aSAqf+5dXFZsL8RtqzPuHhZrdNwQDAoopzP40vTgiJzNHrnD8HRG +LTOkUx0g35Rw== Date: Thu, 11 Mar 2021 09:33:02 +0000 From: Will Deacon To: Anshuman Khandual Cc: Mike Rapoport , linux-mm@kvack.org, Russell King , Catalin Marinas , Andrew Morton , David Hildenbrand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] mm: Enable generic pfn_valid() to handle early sections with memmap holes Message-ID: <20210311093302.GA30603@willie-the-truck> References: <1615174073-10520-1-git-send-email-anshuman.khandual@arm.com> <003d8a4b-9687-3e9a-c27b-908db280b44c@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <003d8a4b-9687-3e9a-c27b-908db280b44c@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_093309_689309_930995AF X-CRM114-Status: GOOD ( 14.71 ) 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 Thu, Mar 11, 2021 at 01:22:53PM +0530, Anshuman Khandual wrote: > On 3/8/21 2:25 PM, Mike Rapoport wrote: > > On Mon, Mar 08, 2021 at 08:57:53AM +0530, Anshuman Khandual wrote: > >> Platforms like arm and arm64 have redefined pfn_valid() because their early > >> memory sections might have contained memmap holes caused by memblock areas > >> tagged with MEMBLOCK_NOMAP, which should be skipped while validating a pfn > >> for struct page backing. This scenario could be captured with a new option > >> CONFIG_HAVE_EARLY_SECTION_MEMMAP_HOLES and then generic pfn_valid() can be > >> improved to accommodate such platforms. This reduces overall code footprint > >> and also improves maintainability. > > > > I wonder whether arm64 would still need to free parts of its memmap after > > free_unused_memmap() is applicable when CONFIG_SPARSEMEM_VMEMMAP is not enabled. > I am not sure whether there still might be some platforms or boards which would > benefit from this. Hence lets just keep this unchanged for now. In my opinion, unless there's a compelling reason for us to offer all of these different implementations of the memmap on arm64 then we shouldn't bother -- it's not like it's fun to maintain! Just use sparsemem vmemmap and be done with it. Is there some reason we can't do that? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel