Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2688176pxb; Mon, 31 Jan 2022 02:01:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnMO91KABS8xf6w8ip7rsEtmuCELGMJ2o2c/L0BQBI556q8CUr5xs2k8rKIU0RVdXEBZl8 X-Received: by 2002:a17:90a:6b4b:: with SMTP id x11mr23828812pjl.11.1643623280267; Mon, 31 Jan 2022 02:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643623280; cv=none; d=google.com; s=arc-20160816; b=nhSiRfYl1eLjOeFYoMmhabxEygX+1I9djabWWEw9wzI31+WWyYWmI/g1ckhgG7WADO TYXXYdlGxK8/eGIe0klLAYEHvS9aaF8Wp6aPa/lLrUeGctv4/EZW8hXnOXSjUtd4URp5 2QyU/XOfqSZ8RNNV7dMCYsexW1EajUWSXJ1vTl3+4YpsiyEUnXeGqca2n0YQRZ5XetIA 380pPHl3na5J4JXIGd1ZRmv4iA98XHuhvPDfzEQ4N8I5lGtp2AE6+9KKuhOXA3VF5trN 9tXDTDX87ogB/6+QkJDQSqRAuMrQa3c705mvMQCA5bh2C6PNkpqgIluD6fCzSiQb8I1h l0uw== 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; bh=90dqidov8xBcLbAkjn09xAAYf3v0NNYozmezEwmZOoo=; b=K5NQS99c3nRL71GB7xBVmPxzLnBYRPc++7ekCVwwsXr8woERDVLBacHRhKn8NZh6yI 9BCBmWBVZ059yyrpGLOdbcFSm57EAWqj6aQuX51LcBIxTMpWKfcgm5xtBmgc/wO2OKIv aJoCPpcwCnxb3XpPaH0y1Spkj497M0Fho4huYN5JbCa/hC0qbnPvCK6/moxtPA3POcNU 3S5fm8b3no+iJJ6RWefQAYu1zXaaDhXCkfH9lSJDzB80XOTjqKSJK+vbpW7jCXhmq7YU gthcJdcndD6JDx9tFtuh1ABcP0bWJxkuHl5wp0MDlFoI1XGuEyurY6aHYGGgtEDUin3f XULA== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o33si9680611pjo.17.2022.01.31.02.01.09; Mon, 31 Jan 2022 02:01:20 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348269AbiA1MGW (ORCPT + 99 others); Fri, 28 Jan 2022 07:06:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242285AbiA1MGU (ORCPT ); Fri, 28 Jan 2022 07:06:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2F5AC061714 for ; Fri, 28 Jan 2022 04:06:20 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D44561AB8 for ; Fri, 28 Jan 2022 12:06:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E625DC340E0; Fri, 28 Jan 2022 12:06:18 +0000 (UTC) Date: Fri, 28 Jan 2022 12:06:15 +0000 From: Catalin Marinas To: Vijay Balakrishna Cc: Nicolas Saenz Julienne , Linux kernel mailing list , linux-arm-kernel@lists.infradead.org Subject: Re: [arm64] kernel boot slowdown in v5.10.19 -> v5.10.42 update Message-ID: References: <9a34ee9b-0ede-30a6-0898-d32fe81d5b0c@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a34ee9b-0ede-30a6-0898-d32fe81d5b0c@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 03:03:48PM -0800, Vijay Balakrishna wrote: > We noticed 150ms kernel boot slowdown back in June, 2021, when moving from > v5.10.19 to v5.10.42. This on a 8GB SoC. Only recently we investigated > this issue and found the regression is introduced by a change in map_mem() > (paging_init() -> map_mem() -> __map_memblock(), in particular "map all the > memory banks" for loop) by patch > > 2687275a5843d1089687f08fc64eb3f3b026a169 > arm64: Force NO_BLOCK_MAPPINGS if crashkernel reservation is required > > above is a follow up to > > 0a30c53573b07d5561457e41fb0ab046cd857da5 > arm64: mm: Move reserve_crashkernel() into mem_init()) > > which deferred crashkernel reservation into mem_init(). > > The ~150ms slowdown disappears on booting without "crashkernel=.." on kernel > command-line. Is CONFIG_RODATA_FULL_DEFAULT_ENABLED set in your config file? It may cause the same slowdown. I suspect it's because we end up mapping the RAM at the page granularity so more loops and slightly higher TLB pressure. Not sure we can do much about. -- Catalin