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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EEF14C25B74 for ; Tue, 21 May 2024 14:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d38zng7+xr6ZkGVz50DdewFrqHj1ggxpz1JZLtw01XQ=; b=q31wIsEvYJM+9E uG18lZh7bnWhkQrG2VDNIr4Yi+YBlQaQ7UNF+mVHmoS4BAkXp6Fc+xzo8H+L+RMuoE7DZzYPTqmFi IfHV6p79TGEHVWjfP57qtvGvSKqX//oaOxFvbU8Azp04/q+MrrQsBKDJ72n2GmMGBVaQ1TTvNUlr/ YKr6LKWRrwFIB50cn5Q1ScFzfBDkUzuMn27LtRR3trB1IetJ75sJPJxT4nN0gQ9kYQZzPt7PeJNYF rWjSfecw4sUrK9SmcSUicdWAMxhyeHIGwG00aK8aKvjeOaCb9szNsOErG8Ry/N0NBcA7YLgtrXJCA RBZmegOxlDx771RBHESg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9QmU-00000000EIc-0WRK; Tue, 21 May 2024 14:47:58 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9QmR-00000000EI3-0C4Q for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2024 14:47:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716302873; 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: in-reply-to:in-reply-to:references:references; bh=6rlVQj7o2xHqikPOD3/lh2xGlv7yRjX/lAkh0YjzPMc=; b=ASsnaGA8ByzEJQXCv+yRXGxHW1arr8gG35JRibikTFAC3f6fbvmDieAJWIkjkAQkgZGPiU fi6MtP88G52a8dHa9VVdSSW4wn/SkVR2pvc3V4ht7xwwLNEjzprD66mqvPggDNetC0EXhG cREopp/fNJ7nwGD0KduOoGJzccEWmOw= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-Ly-6srLsNUmtRT95Eod9nQ-1; Tue, 21 May 2024 10:47:47 -0400 X-MC-Unique: Ly-6srLsNUmtRT95Eod9nQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFF31101A557; Tue, 21 May 2024 14:47:38 +0000 (UTC) Received: from localhost (unknown [10.72.116.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDB2FC15BB1; Tue, 21 May 2024 14:47:37 +0000 (UTC) Date: Tue, 21 May 2024 22:47:34 +0800 From: Baoquan He To: Eric Chanudet Cc: Catalin Marinas , Will Deacon , Andrew Morton , Zhen Lei , Yajun Deng , "Mike Rapoport (IBM)" , Zhang Jianhua , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: init: override deferred_page_init_max_threads Message-ID: References: <20240520231555.395979-5-echanude@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240520231555.395979-5-echanude@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240521_074755_187484_9A2F7C27 X-CRM114-Status: GOOD ( 18.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 05/20/24 at 07:15pm, Eric Chanudet wrote: > This was the behavior prior to making the function arch-specific with > commit ecd096506922 ("mm: make deferred init's max threads > arch-specific") > > Architectures can override the generic implementation that uses only one > CPU. Setting DEFERRED_STRUCT_PAGE_INIT and testing on a few arm64 > platforms shows faster deferred_init_memmap completions: > > | | x13s | SA8775p-ride | Ampere R137-P31 | Ampere HR330 | > | | Metal, 32GB | VM, 36GB | VM, 58GB | Metal, 128GB | > | | 8cpus | 8cpus | 8cpus | 32cpus | > |---------|-------------|--------------|-----------------|--------------| > | threads | ms (%) | ms (%) | ms (%) | ms (%) | > |---------|-------------|--------------|-----------------|--------------| > | 1 | 108 (0%) | 72 (0%) | 224 (0%) | 324 (0%) | > | cpus | 24 (-77%) | 36 (-50%) | 40 (-82%) | 56 (-82%) | > > Signed-off-by: Eric Chanudet > --- > arch/arm64/mm/init.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 9b5ab6818f7f..71f5188fe63d 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -158,6 +158,13 @@ static void __init zone_sizes_init(void) > free_area_init(max_zone_pfns); > } > > +#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT > +int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask) > +{ > + return max_t(int, cpumask_weight(node_cpumask), 1); > +} > +#endif LGTM, Reviewed-by: Baoquan He > + > int pfn_is_map_memory(unsigned long pfn) > { > phys_addr_t addr = PFN_PHYS(pfn); > -- > 2.44.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel