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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 6290CC49ED9 for ; Thu, 12 Sep 2019 05:37:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2E53A20856 for ; Thu, 12 Sep 2019 05:37:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="INShvS6q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=preh.de header.i=@preh.de header.b="cC5SH+Dc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E53A20856 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=preh.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lyMN4f4hT6BYDZuesgnYyhX6lh01e37oo62A4oXw98Q=; b=INShvS6qPT5MTX LTLT10do8TQ2fjrHziSl1zkjiqXvaSagzqvB9AeogFjBDhGd3IbXaVNWoRLiNoxG3A72QxsFtWiwP ie6D1T6aYBWSV8uW7K2+KcAm2cISS8XnJJLI3i7qLSdvOnB0Yq8YsyVqdHBK56X7iyQ2OuHZEBDBi 6kYjCA5UDI3tkjTkPvKq5kSVMeYOJbFltFLMrm5K4m5VwZg3xEgF0N3MV7spRJe1MX3qX8BArAESP b7YITx9gOkLSL6XMjJ0n3Ym9vDy9DYAecfvNxabxV2nAQF6aCFrSrffWKxHuJihSz64kjmBVWOkv+ Te3NjkYyva/7j2PwtA2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8Hn2-0003DP-Bp; Thu, 12 Sep 2019 05:37:08 +0000 Received: from mail01.preh.com ([80.149.130.22]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8Hmz-0003Cy-7B for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2019 05:37:06 +0000 From: Hubert Ralf To: "james.morse@arm.com" Subject: Re: [PATCH] aarch64/mm: speedup memory initialisation Thread-Topic: [PATCH] aarch64/mm: speedup memory initialisation Thread-Index: AQHVZ7YAP7sn04V7oEKvWrPakQZn36cmiUYAgADd1IA= Date: Thu, 12 Sep 2019 05:36:53 +0000 Message-ID: <92d07b70571fd76a7502faa6d199d4d11c498b20.camel@preh.de> References: <20190910085822.27072-1-ralf.hubert@preh.de> <93e5d420-91b7-0e42-7d3f-776323abe450@arm.com> In-Reply-To: <93e5d420-91b7-0e42-7d3f-776323abe450@arm.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tm-snts-smtp: 6A6D6DF8643980ACFDBA9BA559625D0B9F46C165C34F77B8171E1543024AE4182000:8 x-exclaimer-md-config: 142fe46c-4d13-4ac1-9970-1f36f118897a Content-ID: <94F99584725C474C91DEEB88B03B6693@preh.de> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=preh.de; s=key1; c=relaxed/relaxed; h=from:to:cc:subject:date:message-id:references:content-type:mime-version; bh=zy5nLI13VDOJdJBgYEzoE4IyqVrqIjItCwDt2Yato3c=; b=cC5SH+DcToqKaOfCd1wX0588v/qVFd+SFB5t97IuNhHfSVdDCWXUbczBc+uUrrl0y8qB4GdMqN5i n8xpLQiktKE+uQC6kuA2FYfFcyPB0Lh+IGGytfIeZlSk0DbpS/lvpI+2SfWzg/+nyUA6XurCEc5q 69HOp2PjTEgOmxEy0/ofU+eekxooB+Bvq64+c64JdXkk/sX5z7JnNt98aUJmu+X3ZHbDrULgJ6lz pewkx3Lc9P2jClO6IeLljNboEC/I0fhjFNfeiJz+R9LCyEsiubZMRx3qqX23m0GMDL6Rb+KjPRbj 6/ii35TjqJkPPqmAV1TKFHfqXzLIgGEbo4580g== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190911_223705_605667_88B8345A X-CRM114-Status: GOOD ( 16.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi James, On 09/11/2019, 17:22 +0100 James Morse wrote: > Hi Hubert, > > (Subject-Nit: The prefix for this part of the kernel is 'arm64: mm:'. > git log --oneline $file will usually give you enough examples you can > spot the pattern.) Thanks for the hint. > > On 9/10/19 9:59 AM, Hubert Ralf wrote: > > On ARM64 memmap_init_zone is used during bootmem_init, which iterates over > > all pages in the memory starting at the lowest address until the highest > > address is reached. On arm64 this ends up in searching a memmory region > > containing for each single page between lowest and highest available > > physicall address. > > Having a sparse memory system there may be some big holes in the > > memory map. For each page in this holes a lookup is done, which is > > implemented as a binary search on the available memory blocks. > > > > Adding a memmap_init for aarch64 to do the init only for the available > > memory areas reduces the time needed for initialising memory on startup. > > On a Renesas R-CAR M3 based system with a total hole of 20GB bootmem_init > > execution time is reduced from 378ms to 84ms. > > Hmm, there is nothing arm64 specific about this SPARSEMEM behaviour. > Is there any reason this can't be done in core code, where it would > benefit other architectures too? I'll try to move this to the core code. > > (You'd need it to depend on !ARCH_DISCARD_MEMBLOCK as it looks like > memory-hotplug uses this late). > > > Thanks, > > James Thanks, Ralf _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel