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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E4F80C63777 for ; Thu, 3 Dec 2020 12:25:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5905322241 for ; Thu, 3 Dec 2020 12:25:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5905322241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8315C6B0072; Thu, 3 Dec 2020 07:25:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E1108D0002; Thu, 3 Dec 2020 07:25:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FD028D0001; Thu, 3 Dec 2020 07:25:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 574806B0072 for ; Thu, 3 Dec 2020 07:25:11 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1E7CD181AEF31 for ; Thu, 3 Dec 2020 12:25:11 +0000 (UTC) X-FDA: 77551890822.23.sand98_2d0c820273bb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 00C3137606 for ; Thu, 3 Dec 2020 12:25:10 +0000 (UTC) X-HE-Tag: sand98_2d0c820273bb X-Filterd-Recvd-Size: 3545 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Dec 2020 12:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606998309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=If11C0iCi74A54Wkl3ag0eQ5BtnjP7rkQMO7ZCqExaE=; b=jS5gqDkdX7rH4INr6DxMSDe1cqFoK8oS6Uzwrsf0wwIH/jzHnO3kEe/LnOTKXyGgazFYEt 9y/RlJoCDQxvt+V0Qz4SGymvQRsawogeezGmsKKj6elw2mN/O2cVTeYWboosmeVg2Gbt+i 66qTRB5Kb4D6p9LM1h0QiwyRIWeRfo0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-rjH4yoeTP8aZUmdcDRWbSg-1; Thu, 03 Dec 2020 07:25:08 -0500 X-MC-Unique: rjH4yoeTP8aZUmdcDRWbSg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BB4D11858EC9; Thu, 3 Dec 2020 12:25:06 +0000 (UTC) Received: from [10.36.113.250] (ovpn-113-250.ams2.redhat.com [10.36.113.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB8E21899A; Thu, 3 Dec 2020 12:25:05 +0000 (UTC) Subject: Re: Deferred Memory Init: How to bring rest of memory online after limiting it with `mem=XG`? To: Paul Menzel , Feng Tang Cc: linux-mm@kvack.org, Arjan van de Ven References: From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <808e493f-18a2-fe82-46b3-e44fe87e989c@redhat.com> Date: Thu, 3 Dec 2020 13:25:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03.12.20 11:51, Paul Menzel wrote: > Dear Feng, >=20 >=20 > I am trying to reduce the startup time of Debian=E2=80=99s Linux 5.9.9 = on a=20 > Intel Kaby Lake system with 32 GB of memory (TUXEDO Book BU1406 (Clevo=20 > N240BU)). On your Linux Plumbers Conference 2019 slides of your talk=20 > *Linux Kernel Fastboot On the Way* [1], you mention *Deferred Memory In= it*: >=20 >> Deferred Memory Init >> >> =E2=80=A2 8GB RAM=E2=80=99s initialization costs 100+ ms >> =E2=80=A2 In early boot phase, we don=E2=80=99t need that much memor= y >> =E2=80=A2 Utilize the memory hotplug feature >> =E2=80=A2 =E2=80=9Cmem=3D4096m=E2=80=9D in cmdline to only init = 2 GB >> =E2=80=A2 Use systemd service to add rest memory in parallel Uh, that sounds very wrong and flawed. Even if you would be adding+onlining memory in parallel, memory hotplug/onlining code runs strictly sequential. This does not work. And I question this approach in general. We do have deferred meminit in the kernel during boot that can initialize memory in parallel. --=20 Thanks, David / dhildenb