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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AA99C433F5 for ; Mon, 10 Jan 2022 00:53:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98CD26B0071; Sun, 9 Jan 2022 19:53:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 93D3D6B0073; Sun, 9 Jan 2022 19:53:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DD566B0074; Sun, 9 Jan 2022 19:53:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 6F0096B0071 for ; Sun, 9 Jan 2022 19:53:06 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2218918215FB3 for ; Mon, 10 Jan 2022 00:53:06 +0000 (UTC) X-FDA: 79012553172.14.9DF3B3D Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf31.hostedemail.com (Postfix) with ESMTP id 81F7720002 for ; Mon, 10 Jan 2022 00:53:05 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01155B80E8A; Mon, 10 Jan 2022 00:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 483C2C36AEB; Mon, 10 Jan 2022 00:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641775982; bh=BauJqSgB/c/WvTGy2CsGlWb+czkFpCo3Hty1Af1jVeg=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=UDw1x2Ixl56lXCztINoYzB/Nzsbn96dpHFB0EPTpH0hMWrNostQOgQ3VX709KbK3L iuKbhFoXsM8hOAg/bibPFDbQV+so0wxeTwWXW8Hl8+Vv2s2+LaYmBOlb3zKobmTghC AmL3hJLfm+45ScSjRsFgC5hYJlZHDhs2esbGsPqjv3n/YjJ7+/AVPJ95aQRBSx1V32 ssIpprXR6bjN1Z157MSLX1AkdbgZpl1UMZrcTuXVhJ4hnOgO7KSBUIhAQsVgcwsjRR BdHrzdDm8WrRvaWpcGld2TqViLpKKspapzUGQHd7HmQUpG0XwAjNLgmeNvYvD8064D wyVhqDQZcsvrQ== Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 18B8827C005B; Sun, 9 Jan 2022 19:53:01 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute6.internal (MEProxy); Sun, 09 Jan 2022 19:53:01 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudegledgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnhepvdelheejjeevhfdutdeggefftdejtdffgeevteehvdfgjeeiveei ueefveeuvdetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1927521E006E; Sun, 9 Jan 2022 19:52:59 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4526-gbc24f4957e-fm-20220105.001-gbc24f495 Mime-Version: 1.0 Message-Id: <00f58dff-9df5-45ac-a078-d852f13b1dfe@www.fastmail.com> In-Reply-To: References: <7c9c388c388df8e88bb5d14828053ac0cb11cf69.1641659630.git.luto@kernel.org> <3586aa63-2dd2-4569-b9b9-f51080962ff2@www.fastmail.com> <430e3db1-693f-4d46-bebf-0a953fe6c2fc@www.fastmail.com> <484a7f37-ceed-44f6-8629-0e67a0860dc8@www.fastmail.com> Date: Sun, 09 Jan 2022 17:52:39 -0700 From: "Andy Lutomirski" To: "Linus Torvalds" Cc: "Will Deacon" , "Catalin Marinas" , "Andrew Morton" , Linux-MM , "Nicholas Piggin" , "Anton Blanchard" , "Benjamin Herrenschmidt" , "Paul Mackerras" , "Randy Dunlap" , linux-arch , "the arch/x86 maintainers" , "Rik van Riel" , "Dave Hansen" , "Peter Zijlstra (Intel)" , "Nadav Amit" , "Mathieu Desnoyers" Subject: Re: [PATCH 16/23] sched: Use lightweight hazard pointers to grab lazy mms Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 81F7720002 X-Stat-Signature: 67x7t6j684nbw9ww436ksozhhi4i9bhh Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UDw1x2Ix; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf31.hostedemail.com: domain of luto@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=luto@kernel.org X-HE-Tag: 1641775985-286991 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 Sun, Jan 9, 2022, at 1:51 PM, Linus Torvalds wrote: > [ Ugh, I actually went back and looked at Nick's patches again, to > just verify my memory, and they weren't as pretty as I thought they > were ] > > On Sun, Jan 9, 2022 at 12:48 PM Linus Torvalds > wrote: >> >> I'd much rather have a *much* smaller patch that says "on x86 and >> powerpc, we don't need this overhead at all". I can whip this up. It won=E2=80=99t be much smaller =E2=80=94 we still= need the entire remainder of the series as prep, and we=E2=80=99ll end = up with an if (arch needs mmcount) somewhere, but it=E2=80=99s straightf= orward. But I reserve the right to spam you with an even bigger patch, because m= m_cpumask also pingpongs, and I have some ideas for helping that out too. Also: >> exit_mmap(); >> for each cpu still in mm_cpumask: >> smp_load_acquire >> >> That's it, unless the mm is actually in use > > Ok, now do this for a machine with 1024 CPU's. > > And tell me it is "scalable". > Do you mean a machine with 1024 CPUs and 2 bits set in mm_cpumask or 102= 4 CPU with 800 bits set in mm_cpumask? In the former case, this is fine= . In the latter case, *on x86*, sure it does 800 loads, but we're about= to do 800 CR3 writes to tear the whole mess down, so the 800 loads shou= ld be in the noise. (And this series won't actually do this anyway on b= are metal, since exit_mmap does the shootdown.)