Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp441674lqt; Mon, 18 Mar 2024 12:14:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVE6Z3RRJ93l2sQBzHzzSH4SEXnjJ07TXCiwJjkJKpTbx+5SclAjzE3vXrpSiE4/iC+gl8KUEWKQGUo3eM0JtvqDdBFySu9ZnvG7tur2Q== X-Google-Smtp-Source: AGHT+IE8RqWVZLxxyFWwffdcM7PJJpIWgS4F2O2XUgUphEwE5doupDZkILpJlqUt8Yso5z+yaDH8 X-Received: by 2002:a17:902:f551:b0:1e0:280b:8387 with SMTP id h17-20020a170902f55100b001e0280b8387mr4356341plf.40.1710789283852; Mon, 18 Mar 2024 12:14:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710789283; cv=pass; d=google.com; s=arc-20160816; b=Khjx7eEV/2uo/Q05XY17caKzJdcOPf8z01hgPIK9iz97zKdLKVN57ssNfL4fNOWEIj /x10PoVf3592awbQjy1SKXZHVvdSeXiTmTNV426Su4pBduLDlb+ltQn34+hRVhWl3n8A 0ZJbQkLm+ke9wcnUZ2ASVrIoGzFjeta8n0fLIPZ0gF9QJ+rrENPKXrrd21rlcXQHGPLz Qy4q3uRcqz1s5tsq86nzEM8fhF76zvlYfLTmsgXSUk0BtC4w2MIxfzzEUZAH7Nk8DkLQ mEQM7j9HoWUf3LOCXfDwLTNgFkZyqKx+/SXWNbAOL5wsAYKAKbO2kbzTP/CrS/JYu3kW V/ZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature; bh=u/UKUj9g9qNgy27pSw5N8Ba1YdbUQqBEHrRDdRJaHdI=; fh=g/5iZ9ob47lk3hH9qpUSVXrVAISpAdAkfw4Qqq7JcYY=; b=Xsh3JTmoe8JGHUlB8op2pjo21ZfKlyXO8/V5AWto+XV75/P/EjmMPrfOf+lwJk+5io bYovFRACI2Z3/epF77oaAZo1bM5IRhnargAlSLsPlm4/vhULr67kMZgCzsUSHM6Sv8yt DvB1VLo+i1nmJE8t1tLAD0elPxSL874fvWZ0zK9JNtVM6ZBxaD5ZYYc7BpFNOl+QKo1f Dz+Dpm7FuZd54HNkFOWkjhrYBT3S/1le6FxOkSuWXmLbMfnWvBeyeyp0gSr0JVBJRTD8 rIwT1wM7JbcpOj/G+MY4foEr6DquVhH8CJMzBsKiuOf1cuWmKhexOkvAJaky/1oGqlYY l5tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="orIhn1/d"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106558-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2-20020a170902cec200b001e02dff570esi1820280plg.202.2024.03.18.12.14.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 12:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="orIhn1/d"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106558-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106558-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C945828453C for ; Mon, 18 Mar 2024 19:14:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87E8556B83; Mon, 18 Mar 2024 19:13:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="orIhn1/d" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9FE458209; Mon, 18 Mar 2024 19:13:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710789208; cv=none; b=L5LrjsPCi9w+C1u9yQW/75Def3lrQd6fv5ln3sJjye+tvVD2CsP+s490Uhnx+rMifAxewKHS725KMGOKnMoackOo4NKKEiDp3rEPIUIHg9KhrDB5F/pgdzpaOLhDYQN7+WOA5YJpuvvi6CwhYLCHgWuF2QFBFHeDsmCXo7iRb60= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710789208; c=relaxed/simple; bh=g3OpJ2WmV+FZJE+8M2WBoafZTplReYZUKjMO+eX5RQI=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=jSFpEzDUVlhIS/AwpNlMILQPlF/lAXf+swvHLKlMzmzuVe0EhKzSaic6zGQvrOZJbwOdAGY1E7XWYAYfT96jM/4FmlMft+OQuRyji0VBFFy14xdMMXZNj44zp6kGqomHjRiAbETeDUGOHrgewfWwUaY2mNfV87sinM0U04hio2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=orIhn1/d; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E62E5C43394; Mon, 18 Mar 2024 19:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710789208; bh=g3OpJ2WmV+FZJE+8M2WBoafZTplReYZUKjMO+eX5RQI=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=orIhn1/dm1QGLuuhDj7vCaZPAhboHKV2GIrsPlJ4yErZMbGHt/MV+xtdIcBsXeqgW xtGbFgWviOV6m6L7On19eE0d2TH2t4xS8bp13wfPxn+FbCO6A0QrbiG9jPTRXcgVwm YF1MmFcCTINK8o/P935lRfAwWZudiU6wE6XYzgwEpJy96+i4bBOLTedH6aBro6sih2 QBCALxs6KkUnvg0orvLXnGHfy0XotTvvd0vF86+ym8TvjgIKpYo0P2PPkql4qPU9p8 iuWrKSL9tv+Iyzapl2HfNNU2m0+aazVQ5s4KXEepSO/hEQRu2lZ1IC4eoO8Ro027Et o4ndfozFFFx1g== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfauth.nyi.internal (Postfix) with ESMTP id E1E871200068; Mon, 18 Mar 2024 15:13:26 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 18 Mar 2024 15:13:26 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeejgdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusehkvghrnhgvlhdrohhrgheqnecuggftrf grthhtvghrnhepvdeviefgtedugeevieelvdfgveeuvdfgteegfeeiieejjeffgeeghedu gedtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghrnhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduvdekhedujedt vdegqddvkeejtddtvdeigedqrghrnhgupeepkhgvrhhnvghlrdhorhhgsegrrhhnuggsrd guvg X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 48FC7B6008D; Mon, 18 Mar 2024 15:13:26 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-300-gdee1775a43-fm-20240315.001-gdee1775a Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <28ceb124-b634-44e0-bcd4-848fc3b0be7a@app.fastmail.com> In-Reply-To: <87le6fih5w.ffs@tglx> References: <20240303235029.555787150@linutronix.de> <20240304005104.622511517@linutronix.de> <87y1ajjsv9.ffs@tglx> <87o7bfjeae.ffs@tglx> <877ci3j80k.ffs@tglx> <87le6fih5w.ffs@tglx> Date: Mon, 18 Mar 2024 20:13:05 +0100 From: "Arnd Bergmann" To: "Thomas Gleixner" , "Linus Torvalds" Cc: "Guenter Roeck" , LKML , x86@kernel.org, "Uros Bizjak" , linux-sparse@vger.kernel.org, "kernel test robot" , oe-kbuild-all@lists.linux.dev Subject: Re: [patch 5/9] x86: Cure per CPU madness on UP Content-Type: text/plain On Mon, Mar 18, 2024, at 18:27, Thomas Gleixner wrote: > On Sat, Mar 16 2024 at 02:11, Thomas Gleixner wrote: >> On Fri, Mar 15 2024 at 16:23, Linus Torvalds wrote: >> The amount of subtle SMP=n fallout has been kinda exponentially >> increasing over the years and it's just putting burden on the wrong >> people. TBH, I'm tired of this nonsense. > > And for the fun of it I hacked Kconfig to allow a SMP=y NR_CPUS=1 build > and checked the size of vmlinux: > > 64-bit 32-bit > SMP, NCPUS=1 38438400 22110177 > UP 38393703 21682041 > Delta 44697 428076 > 0.1% 2% > > The UP savings are not really impressive... > > Let me look what it actually takes to do that. FWIW, I did some experiments a few weeks ago on 32-bit ARM, using a fairly minimal kernel in a virtual machine, and checking the runtime memory consumption rather than compile-time. In a kvm guest with 32MiB RAM, I saw a difference of multiple megabytes in memory usage: Linux testvm 6.8.0-rc4-00410-gc02197fc9076-dirty #1 SMP PREEMPT armv7l root@testvm:~# free total used free shared buff/cache available Mem: 26932 14956 1732 52 12800 11976 Swap: 16360 3632 12728 Linux testvm 6.8.0-rc4-00410-gc02197fc9076-dirty #2 PREEMPT armv7l root@testvm:~# free total used free shared buff/cache available Mem: 26932 13744 5648 32 10092 13188 Swap: 16360 3880 12480 There is a little difference between runs, but this does seem significant enough to keep it. The SMP build was with CONFIG_NR_CPUS=2 (the smallest supported compile-time number), but running on a single-CPU qemu instance. Arnd