Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2293670ybz; Thu, 30 Apr 2020 14:32:07 -0700 (PDT) X-Google-Smtp-Source: APiQypKTwZWKONdttQsqp1erTODdnM2gHjyjccPYeGNEY5ziZUIXJ2oZEQfdwSVVEnbYGM7ZuYmS X-Received: by 2002:aa7:cf0e:: with SMTP id a14mr971180edy.188.1588282327646; Thu, 30 Apr 2020 14:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588282327; cv=none; d=google.com; s=arc-20160816; b=GDZvFXS9f8rncGPL/gxdCpaiFU0FN4qs/ArcikWIZO34VDBuVqzSQNP/y6MPeXPx+J 7APM8PuCJO1p5qx6b3mgCpAQkbizr7mme6fhi6Grz817cPk52wOGusR5dnGVWXKcQD1V 51ZDoXRKuUlEs6tAAkzGi8i0/+52Bk4/cWnuvLa8/gDp2pRoBEluy9Js7Vfi1RhKktEb LmVdiqyTnj35h7F0nnwNEht5Tma/VNxOxV4ta7qBrX3jK17BMJupfx1iurugDtFVbLeG gfNizuAajGPq6C6oVXt/xb4B5LKXObwE4kPM3gTRnUFerJCKP8rDM4TQhww9rgzfQD3b NyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ixowIR2/ctTEeguDtKkWm44iJzlw1XnXHapWxieTNe0=; b=AIlk2QAMhAV9SrAyKa/ppqT2Q/LVuwIXXhPXdyq1FxxlNP+4WDmyJM3clzjfGAA+lj rTgXrHHxZ+Xs8aNeIujde3eiGxof2ekDmfuX7LW1Uvzpym3PN3KU4Uf+NJ1op/LqC2Z3 IoDoiAaWcmQWR9Hh2C8T0JQdPKNZGpPP9zlJI3s41NirzVlpkGD/2ACXjREsCJ9+j1bF zm88gFrOWO7X9xUtFUP40DdNOGR3UaXugKwbvLyMyeQAdYUUCJ3kS0y5cn6g+zFeAiMW LXcp8APJEJ830rXfvN9D+ZVBnFgbElAu1CZ27+EPapV5lhfBt7o9ndm3bu69LcAp/gqT xKhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n3v24GDL; 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 di22si488721edb.427.2020.04.30.14.31.37; Thu, 30 Apr 2020 14:32:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=n3v24GDL; 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 S1726447AbgD3Vbd (ORCPT + 99 others); Thu, 30 Apr 2020 17:31:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:44490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgD3Vbd (ORCPT ); Thu, 30 Apr 2020 17:31:33 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07C8820870; Thu, 30 Apr 2020 21:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588282292; bh=Bkl834xA9CcEf8hJwN2hSps66VvWfQ0obMpJUC2DhsI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n3v24GDLU0OAacwQ8azR4ZyAH5L3zSqPATNrbvEhpRTC9Q9/nuG17Q0Cck8wscapG Y1g5a4dTXh/93Ig5fF8vwETzF+pKorxdKNJqO2MqxYSJq/wQZy7YVk8PNlgT7rWxht JJU7Zj83UBZFTuWnzZGeHq02EE6uLPPSRoKVL7Qg= Date: Thu, 30 Apr 2020 14:31:31 -0700 From: Andrew Morton To: Daniel Jordan Cc: Herbert Xu , Steffen Klassert , Alex Williamson , Alexander Duyck , Dan Williams , Dave Hansen , David Hildenbrand , Jason Gunthorpe , Jonathan Corbet , Josh Triplett , 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: <20200430143131.7b8ff07f022ed879305de82f@linux-foundation.org> In-Reply-To: <20200430201125.532129-1-daniel.m.jordan@oracle.com> References: <20200430201125.532129-1-daniel.m.jordan@oracle.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 30 Apr 2020 16:11:18 -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. How long is this up-to-91% in seconds? If it's 91% of a millisecond then not impressed. If it's 91% of two weeks then better :) Relatedly, how important is boot time on these large machines anyway? They presumably have lengthy uptimes so boot time is relatively unimportant? IOW, can you please explain more fully why this patchset is valuable to our users?