Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp140041ybz; Thu, 30 Apr 2020 18:10:29 -0700 (PDT) X-Google-Smtp-Source: APiQypLV/b/F5mjvhCE7kkxb8Xa7UKDXvzYwR7Gg5wVPNb806anv/hdC9b0A0iZ+C8U789qSZTz/ X-Received: by 2002:a05:6402:2208:: with SMTP id cq8mr1568361edb.293.1588295428931; Thu, 30 Apr 2020 18:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588295428; cv=none; d=google.com; s=arc-20160816; b=tkwLbX7mXy4qc/WE2BYBBeqTazvUSrL4WSHDhNshd068MH9GI8HLqYnoVLu6WIKX5H uUkngFWdEc08fu+Lp03DH1ld7X9twqH255Y7GbRrkbCiCLbxxy6dcPqXPoGDpCxySv3y rUjQ1T41tnSVg8s1Qq3VyBdV9NBginj4SRhbcGnuuOdRwR1HZbZmIu0GK9/TXPsYJuAn vSyXEun4L0itAvymgFJ0Bo8b/E8XkOtIEkfPkOdCnruDwgjTo9ZU8nHS9cR12vW3QAfO kxv/FB9/GmATfXO7S6niA5CgKQ1fwLdAWmFOudxgFqa3NHOO/iYl/M4ODiftoGvj/Hfg algA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Wre01nqlTovl9vf0kE4OoICzwAzB58U/mcMueY158AA=; b=dFAzqNFvWo5/3GpZGO/fm3/rWT4/ICB1M94Mj4CzwSz7z3zZsuNvDXjKWgFmf8Yb1n nN8bKTUCi3PiM3SkjU5WxYlfjSlJnbWrfGYLgLrpl9BtNupfPjJqJafM+dwW65BFXIE3 h3VehdGx0+ilUiAIMwrxHT6ujC5KtMNGdiDUF2SSgKU9cYk2hOzE/bavvtvxaSneRdWL de/xMSJblIYZ58vxZVSjTm82drLqiJS/Luqgocbwl5QPr3lJtWkdTAmLO+MsfBkqJ5LQ qgBlG12LMeLri5JmXwT4jkGXNSynT5vdQO3ulQe07NoospWJEulsU36KFlo9qvB1LsRr 6CyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 l27si791381edj.537.2020.04.30.18.10.00; Thu, 30 Apr 2020 18:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgEABJv (ORCPT + 99 others); Thu, 30 Apr 2020 21:09:51 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:48077 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbgEABJv (ORCPT ); Thu, 30 Apr 2020 21:09:51 -0400 X-Originating-IP: 50.39.163.217 Received: from localhost (50-39-163-217.bvtn.or.frontiernet.net [50.39.163.217]) (Authenticated sender: josh@joshtriplett.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DBED520005; Fri, 1 May 2020 01:09:37 +0000 (UTC) Date: Thu, 30 Apr 2020 18:09:35 -0700 From: Josh Triplett To: Daniel Jordan Cc: Andrew Morton , Herbert Xu , Steffen Klassert , Alex Williamson , Alexander Duyck , Dan Williams , Dave Hansen , David Hildenbrand , Jason Gunthorpe , Jonathan Corbet , Kirill Tkhai , Michal Hocko , Pavel Machek , Pavel Tatashin , Peter Zijlstra , Randy Dunlap , Shile Zhang , Tejun Heo , Zi Yan , linux-crypto@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] padata: parallelize deferred page init Message-ID: <20200501010935.GB104377@localhost> References: <20200430201125.532129-1-daniel.m.jordan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200430201125.532129-1-daniel.m.jordan@oracle.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Apr 30, 2020 at 04:11:18PM -0400, Daniel Jordan wrote: > Sometimes the kernel doesn't take full advantage of system memory > bandwidth, leading to a single CPU spending excessive time in > initialization paths where the data scales with memory size. > > Multithreading naturally addresses this problem, and this series is the > first step. > > It extends padata, a framework that handles many parallel singlethreaded > jobs, to handle multithreaded jobs as well by adding support for > splitting up the work evenly, specifying a minimum amount of work that's > appropriate for one helper thread to do, load balancing between helpers, > and coordinating them. More documentation in patches 4 and 7. > > The first user is deferred struct page init, a large bottleneck in > kernel boot--actually the largest for us and likely others too. This > path doesn't require concurrency limits, resource control, or priority > adjustments like future users will (vfio, hugetlb fallocate, munmap) > because it happens during boot when the system is otherwise idle and > waiting on page init to finish. > > This has been tested on a variety of x86 systems and speeds up kernel > boot by 6% to 49% by making deferred init 63% to 91% faster. Patch 6 > has detailed numbers. Test results from other systems appreciated. > > This series is based on v5.6 plus these three from mmotm: > > mm-call-touch_nmi_watchdog-on-max-order-boundaries-in-deferred-init.patch > mm-initialize-deferred-pages-with-interrupts-enabled.patch > mm-call-cond_resched-from-deferred_init_memmap.patch > > All of the above can be found in this branch: > > git://oss.oracle.com/git/linux-dmjordan.git padata-mt-definit-v1 > https://oss.oracle.com/git/gitweb.cgi?p=linux-dmjordan.git;a=shortlog;h=refs/heads/padata-mt-definit-v1 For the series (and the three prerequisite patches): Tested-by: Josh Triplett Thank you for writing this, and thank you for working towards upstreaming it!