Message ID | 20210518090613.21519-1-rppt@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=EhE/=KN=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 901D7C433B4 for <linux-arm-kernel@archiver.kernel.org>; Tue, 18 May 2021 09:08:32 +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 1881C6108D for <linux-arm-kernel@archiver.kernel.org>; Tue, 18 May 2021 09:08:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1881C6108D 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:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=34lmfEOYcivBY7Exdc1CWOhje5aTwvdIIjfnDQvmH+c=; b=S8yBqulwgSRdhJ9KuBa2MwJVHK rYZLt6inB4RRaPr34Z+H7iQ2+Z2RYEN8APE+78UzsPBHLW2K0UaqN3AYdeeNpUjTmeloYMabjQhij t0cFMkeTs/Cfn9ZBsEk5zGAf8LWQ1rHZXcEWz+1Hkrjs6P3LwRuqG8O5CZxDnMTeCoY0Qj42F8x82 YGwedWjGvTcVyo9rRjPD11aST9G7g3KbgeEKknEQ6cgYX49Ekbe15XD07v85CTVWcZegSK+hqoGKI bhANBHeT65hw15fpj+9I90glnrgKeFlt6bDCNWWwG24Nh8qBDKVrcQdRQ87V8QvRyA5S1avuCs3jj JaEbgy4w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1livgI-0002On-Md; Tue, 18 May 2021 09:06:26 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1livgF-0002O1-Ay for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 09:06:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=44oWNTrBAlqXof5saxharAKEM2K79PGdt4BjigYVB8k=; b=ZuLPPTJ+1dQ4Zzf61vMppBYwym uamkUyDHbucHV0rJuMWwbklSMHTdz6upeyWuiO7yUgbERvJlcP8G3mUTTRzdwEG7CjExtP1scl+0x 1oNuVUnpS2Fdo7CCxxpPcF/xl2ilZXvJBJX48Px472cjpwZwftFVGAr+Pb70h2+DJMXqKdxzycWVd +tqaQlIRBxhYbAkIO9e5HiiqPIOrpeagu7pgvaLSwIdyVw5BizhQLdGax1SCOlhAWVjnlX1Jlw3Dp jvH72zgotsvXbduNEcw7TudGJNhVpm9hZRuuM2zPm+WiYqL/hoD6PDzJ/zZC7/akYkYlOBEoivMwc qugLUggw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1livgC-00EUOj-Ek for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 09:06:22 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7590160720; Tue, 18 May 2021 09:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621328779; bh=TzSLko8JIrWpgMH4yRw1BrafNW9JkoU7wGnWik8SgXI=; h=From:To:Cc:Subject:Date:From; b=R3+GEhhOSKW/448lAMB4GPAnhF+NA0EXOBRHzgsTFkGOzmGULZsyhxzBU3oeVytpL lw1zqEmpxgJjtbqCil42bs9BrYcsPrQEVxWJGkpiOicZHsRP+ikIFTl0ziVzGsqkL1 4dsxPoaJ3HP088s5XAE/GJK4mvGwESAGDWzZ4pBjS6yHd3hQKUUP35pco8UDvosNgl ZpZ+zcFIJwOS//+NHAwOcr09g0E6fI4ukRbCJjVeQEISGL1Ul5Z8F+gSIVbRxCYf6w 4BqkQwkwSa8DP+y2Lkl41EZK9fCKM/IeG/oZwzblaxO0ExSa7bYGZ5yAychdWsyPaq tJTraJZmqW9VQ== From: Mike Rapoport <rppt@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: Andrew Morton <akpm@linux-foundation.org>, Kefeng Wang <wangkefeng.wang@huawei.com>, Mike Rapoport <rppt@linux.ibm.com>, Mike Rapoport <rppt@kernel.org>, Russell King <linux@armlinux.org.uk>, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/3] memblock, arm: fixes for freeing of the memory map Date: Tue, 18 May 2021 12:06:10 +0300 Message-Id: <20210518090613.21519-1-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_020620_535879_260637F6 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
memblock, arm: fixes for freeing of the memory map
|
expand
|
From: Mike Rapoport <rppt@linux.ibm.com> Hi, The coordination between freeing of unused memory map, pfn_valid() and core mm assumptions about validity of the memory map in various ranges was not designed for complex layouts of the physical memory with a lot of holes all over the place. Kefen Wang reported crashes in move_freepages() on a system with the following memory layout: node 0: [mem 0x0000000080a00000-0x00000000855fffff] node 0: [mem 0x0000000086a00000-0x0000000087dfffff] node 0: [mem 0x000000008bd00000-0x000000008c4fffff] node 0: [mem 0x000000008e300000-0x000000008ecfffff] node 0: [mem 0x0000000090d00000-0x00000000bfffffff] node 0: [mem 0x00000000cc000000-0x00000000dc9fffff] node 0: [mem 0x00000000de700000-0x00000000de9fffff] node 0: [mem 0x00000000e0800000-0x00000000e0bfffff] node 0: [mem 0x00000000f4b00000-0x00000000f6ffffff] node 0: [mem 0x00000000fda00000-0x00000000ffffefff] The crashes can be mitigated by enabling CONFIG_HOLES_IN_ZONE and essentially turning pfn_valid_within() to pfn_valid() instead of having it hardwired to 1. Alternatively, we can update ARM's implementation of pfn_valid() to take into accounting rounding of the freed memory map to pageblock boundaries and make sure it returns true for PFNs that have memory map entries even if there is no physical memory. I can take the entire series via memblock tree. [1] https://lore.kernel.org/lkml/2a1592ad-bc9d-4664-fd19-f7448a37edc0@huawei.com Mike Rapoport (3): memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER memblock: align freed memory map on pageblock boundaries with SPARSEMEM arm: extend pfn_valid to take into accound freed memory map alignment arch/arm/mm/init.c | 15 ++++++++++++++- mm/memblock.c | 23 ++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) base-commit: d07f6ca923ea0927a1024dfccafc5b53b61cfecc