Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp374193pxy; Sat, 31 Jul 2021 09:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfqTdj/h/Vdobc+QPfFvj8I7MCvpMj2CMZOcrlpBELNGwfqpqdQHfac7/BBVY4T8NelhjD X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr7884745ejc.180.1627750754811; Sat, 31 Jul 2021 09:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627750754; cv=none; d=google.com; s=arc-20160816; b=GG7HG9TPW+ppAzzvJ2eY6bt3AYLm/a4AlCbWYo3cGV+JoznCTcbRKgIGS3f/cAZ5F+ ZSSTlmSUg6AZPbMGJZi5rc0+mwzbbYkXlV0uTC9HfSn3rMKI8gg2xg3zRw1a9kR0rV5E k2P8Vl8+5g0fZwYSehWnkH3h1VKK8hlL+uXXxmyqxYJXTf+7dxVUZV3vloznCU2FLiT5 D8RV8YcFmAEU3/g8YGuWj2obYZcpGWwlpwUVorxkrQe5wXHYpcSfD15l4dL2MZGS2DEm XbSuD+UWRslsq6xZ1Klk/hij9yCEasu9mn37Wyt0ueaSQrlg4d/Oa5xbqSajxMEsqzeP fOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=EGVOaVtjMq5XNSC5HlGQYOQPa1eoJCtX+l2Bxd44EkE=; b=ndNufHlzKkszvLJkyQDvxj8rw+TEAtfdZOKwAm2lhLCWQfHfDeXD/D6aMa4BYsqTi7 ICTsC2SPBHbyNB+TqAQz3Oyb3WKvtkZ4FNmTPjQ3RpOBaJPg62z6qg9yg6Xa1TuxkjSV TNKBXZCEiT5r0Ng1K3D7s+heWjZrys1dJZVZXh9J/I6jua1p46aCwK+M8ZJEhJJi33uE M3wBwqMbnwVz15CuKYhSTViogAhBiVb/uyJ05YKNgMWu7+WtO1q8owGaZ+6mFTNQdgQ6 W1vFlxJ6lIAQWimUZJDDedH/s9zRdQlM85Hy1mzQ9mYVIyNa6WuErQUpp3sDR28X0kqp 10Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IXw4JxmR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr21si4812431ejc.474.2021.07.31.09.58.48; Sat, 31 Jul 2021 09:59:14 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IXw4JxmR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbhGaQ4M (ORCPT + 99 others); Sat, 31 Jul 2021 12:56:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbhGaQ4M (ORCPT ); Sat, 31 Jul 2021 12:56:12 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C950FC0613CF for ; Sat, 31 Jul 2021 09:56:04 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id u25so18079606oiv.5 for ; Sat, 31 Jul 2021 09:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EGVOaVtjMq5XNSC5HlGQYOQPa1eoJCtX+l2Bxd44EkE=; b=IXw4JxmRSJzZhZ0FKi7pak4HydBuQq8t+Plwb1wNOQgWbdHNV6byOKqQmJPHWKlCrS i9UN89jR3d/Imv+U+OXR3HSPZjdH52Sr3i+T3ixxzRa/C7GW7fMlub1xDDgWPyj/9qwu ZESuVvW73kLasTQwwu/NUgMUCrcA8eh+p8GFHJfMn7XJwroKRwIwmD/tdi7fEhHwZBN8 3sy8BABBIdZ27CcDUDqcp2tjkqCql0QZAx5gMOZigCFry9MQ4kxl43oV1DuVFvOib6qD ZZQBK6Zr65Ww/o3eeZQzVxkH2cBclxpbJL47juFCjIYE79QnWVmsEeicLoNy5REHMuUi 3CjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=EGVOaVtjMq5XNSC5HlGQYOQPa1eoJCtX+l2Bxd44EkE=; b=a4xQwpDwLkD85Gjq6Cjtn7leBavucSKePop/ldLSAHvWk+rnUOs2UlcZcv6C6H8KQO OkMCHwHA8vTZrNWP0z7npDv8KqPcyvKYHS9zwgyYbr3H8LCCus0uAgPl5p7U3T8moHxM PgyTbkL96Tmf8K/kn884AfNTRqicWd1ZilgWhhkvCu6N1r0vxY0SHyBNIzNgcEUbPBvg 0Dzb2P+E8ZKMQ2skMIPWyl+3g/B4SkBft0+f2Phl9eSbNK8V0CJzqjsdqpxvzx7zSPyO dNF1ObzudiU1Uaglk8+XK0U3BCwRm3V4GNh77vnxxpJVYtFyUk8iZz5IiB1Fva06Xi5t VqAA== X-Gm-Message-State: AOAM53241geD00nOanxCPLX8uS/oAxyTQIp5OA3wY7yojfwrZ1rlu8cy 66e/bW46emvO/p9VN5r+cVg= X-Received: by 2002:a05:6808:d4d:: with SMTP id w13mr5884374oik.98.1627750564188; Sat, 31 Jul 2021 09:56:04 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id be15sm880127oib.18.2021.07.31.09.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Jul 2021 09:56:03 -0700 (PDT) Sender: Guenter Roeck Date: Sat, 31 Jul 2021 09:56:01 -0700 From: Guenter Roeck To: Mike Rapoport Cc: Andrew Morton , Michal Simek , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/4] mm/page_alloc: always initialize memory map for the holes Message-ID: <20210731165601.GA1900220@roeck-us.net> References: <20210714123739.16493-1-rppt@kernel.org> <20210714123739.16493-2-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714123739.16493-2-rppt@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Jul 14, 2021 at 03:37:36PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > Currently memory map for the holes is initialized only when SPARSEMEM > memory model is used. Yet, even with FLATMEM there could be holes in the > physical memory layout that have memory map entries. > > For instance, the memory reserved using e820 API on i386 or > "reserved-memory" nodes in device tree would not appear in memblock.memory > and hence the struct pages for such holes will be skipped during memory map > initialization. > > These struct pages will be zeroed because the memory map for FLATMEM > systems is allocated with memblock_alloc_node() that clears the allocated > memory. While zeroed struct pages do not cause immediate problems, the > correct behaviour is to initialize every page using __init_single_page(). > Besides, enabling page poison for FLATMEM case will trigger > PF_POISONED_CHECK() unless the memory map is properly initialized. > > Make sure init_unavailable_range() is called for both SPARSEMEM and FLATMEM > so that struct pages representing memory holes would appear as PG_Reserved > with any memory layout. > > Signed-off-by: Mike Rapoport This patch causes microblaze petalogix-ml605 qemu emulations to fail silently (no console output). Reverting it fixes the problem. Guenter --- Bisect log: # bad: [8d4b477da1a807199ca60e0829357ce7aa6758d5] Add linux-next specific files for 20210730 # good: [ff1176468d368232b684f75e82563369208bc371] Linux 5.14-rc3 git bisect start 'HEAD' 'v5.14-rc3' # good: [8f3eb1f5c702ef868d89799b03c21d122f2fe197] Merge remote-tracking branch 'bpf-next/for-next' git bisect good 8f3eb1f5c702ef868d89799b03c21d122f2fe197 # good: [32286c7080c56c835f25302c38eebccf41b7b576] Merge remote-tracking branch 'tip/auto-latest' git bisect good 32286c7080c56c835f25302c38eebccf41b7b576 # good: [70c40604c7d393f95171f49717a27bf8e05b5439] Merge remote-tracking branch 'dmaengine/next' git bisect good 70c40604c7d393f95171f49717a27bf8e05b5439 # good: [b038834891b35ec410693028a500f769db132a81] Merge remote-tracking branch 'rust/rust-next' git bisect good b038834891b35ec410693028a500f769db132a81 # bad: [d8f4e506a9ba375110945d75573b3304491e6350] memory-hotplug.rst: complete admin-guide overhaul git bisect bad d8f4e506a9ba375110945d75573b3304491e6350 # good: [bef692dcfb7cdb5c960abfc31e2386a0ff41af54] lazy tlb: shoot lazies, a non-refcounting lazy tlb option git bisect good bef692dcfb7cdb5c960abfc31e2386a0ff41af54 # bad: [5fcd957e2f0dc4cb25a6ee60ebfb1200de09c9d1] mm-migrate-demote-pages-during-reclaim-v11 git bisect bad 5fcd957e2f0dc4cb25a6ee60ebfb1200de09c9d1 # good: [8c2a82ab20eb09d217446989ae209f5ff19a64ac] mm/vmalloc: use batched page requests in bulk-allocator git bisect good 8c2a82ab20eb09d217446989ae209f5ff19a64ac # bad: [c36a5446e29f1461780b06785769b9402522f847] mm/page_alloc.c: fix 'zone_id' may be used uninitialized in this function warning git bisect bad c36a5446e29f1461780b06785769b9402522f847 # good: [05e358c552628e26be3985933bea88e7512414c0] mm/kasan: move kasan.fault to mm/kasan/report.c git bisect good 05e358c552628e26be3985933bea88e7512414c0 # bad: [b467ff7f560908e60ca181658b7ee48e5da94da1] microblaze: simplify pte_alloc_one_kernel() git bisect bad b467ff7f560908e60ca181658b7ee48e5da94da1 # bad: [d2a572bf593a57246827bd79c91fe2ee6b7af1f0] mm/page_alloc: always initialize memory map for the holes git bisect bad d2a572bf593a57246827bd79c91fe2ee6b7af1f0 # first bad commit: [d2a572bf593a57246827bd79c91fe2ee6b7af1f0] mm/page_alloc: always initialize memory map for the holes