Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4308814pxu; Wed, 9 Dec 2020 13:45:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3Dey3WzkrTH98GcCvmEyipF/fKAVDpdImcRdG+HBF4sRlcThkdvc6xVE/v6Y4mgedVVV3 X-Received: by 2002:a17:906:3508:: with SMTP id r8mr3678718eja.137.1607550355334; Wed, 09 Dec 2020 13:45:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607550355; cv=none; d=google.com; s=arc-20160816; b=MqyK5+GdAhEGWmyr0EI5u59hSpbuA0305jlXziMpp0Dk0N9mC1pir8u49OQMpwmwyT HfZ7IFtgxhJRbpday55BUj0K6wg8QE+cLAiCfli1k5fPwBgiEDHKYpAVIJO8MAkCg21s 0odKe7xTiMjF1d0DsD6hUKVmw3sDN8lasYnR5cD34Ih1kFkJHVP8dvlsOfdekwCuKUTl ++RMIeVI+FHyYcCjOKOQavwHhRIXBClAhvqqo7Oastxqkghh5ereQ6mP9G0FaLKiWJ3W CsKu8Qx6lzQdwpJigOSMQL/dgVfNMrdioa55cbhdcsqSgaUa7ml/GSTdTy70gDblMbw2 AtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=D+5Sk/XNH3W7ORhXPrvSNJg+rmZ4s94okZJITivOtKs=; b=pRm5ZjR6X1E/t1NMbXTJnGe9rRnXlHHT4vhuPqyFSbO7jQrN+v0Rej5eCj+H4m5/bN I7/VJ+6LvispEO2XrvLm69Lsrorgjf1/W4XRrPictBJJM9s0YRuRubaVMG+h4PYHGUE6 /KlNoNmJjRKYMfGPVrHCF05ooPTZrRefgVIARy93Z1G5TDObm1EpsY9KQchp/evG6J0i fMTtP/kjQDCmPet1P2171+zOYBPxY0TpcWZ0rjRdoZ6VM9IPPnAsxV4aS9/tqrsO46uH h7pCaShlE7BoFjR4iHUkIxoh7nNwYa7EHmKziu13jPJhcGQWK8hirYnCAAzw26N8i9eu ProA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si1482234eja.453.2020.12.09.13.45.31; Wed, 09 Dec 2020 13:45:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733021AbgLIVnx (ORCPT + 99 others); Wed, 9 Dec 2020 16:43:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:47260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbgLIVnw (ORCPT ); Wed, 9 Dec 2020 16:43:52 -0500 From: Mike Rapoport Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Andrew Morton Cc: Andrea Arcangeli , Baoquan He , David Hildenbrand , Mel Gorman , Michal Hocko , Mike Rapoport , Mike Rapoport , Qian Cai , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org Subject: [PATCH v2 0/2] mm: fix initialization of struct page for holes in memory layout Date: Wed, 9 Dec 2020 23:43:02 +0200 Message-Id: <20201209214304.6812-1-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport Hi, Commit 73a6e474cb37 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") exposed several issues with the memory map initialization and these patches fix those issues. Initially there were crashes during compaction that Qian Cai reported back in April [1]. It seemed back then that the probelm was fixed, but a few weeks ago Andrea Arcangeli hit the same bug [2] and after a long discussion between us [3] I think these patches are the proper fix. v2 changes: * added patch that adds all regions in memblock.reserved that do not overlap with memblock.memory to memblock.memory in the beginning of free_area_init() [1] https://lore.kernel.org/lkml/8C537EB7-85EE-4DCF-943E-3CC0ED0DF56D@lca.pw [2] https://lore.kernel.org/lkml/20201121194506.13464-1-aarcange@redhat.com [3] https://lore.kernel.org/mm-commits/20201206005401.qKuAVgOXr%akpm@linux-foundation.org Mike Rapoport (2): mm: memblock: enforce overlap of memory.memblock and memory.reserved mm: fix initialization of struct page for holes in memory layout include/linux/memblock.h | 1 + mm/memblock.c | 24 ++++++ mm/page_alloc.c | 159 ++++++++++++++++++--------------------- 3 files changed, 97 insertions(+), 87 deletions(-) -- 2.28.0