Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1839706lqe; Tue, 9 Apr 2024 01:42:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7hvs3kpqdcd0fLaihOJH+uQWvD/EbaKURZ+IZILLYRoeaT39oEYXBUMqD+9208Q3l+1eTyc8eKtd3iPp9dbD0AzPJ6y/swZe4w03FMA== X-Google-Smtp-Source: AGHT+IHIA/x5n9SjfQZ8kg9krfYPUzfgEp5r2bPxBNeyXu+LAHJ2t2Ad8i5m0iTXbLmq4redRZr6 X-Received: by 2002:a17:902:700a:b0:1e4:32ba:1ef with SMTP id y10-20020a170902700a00b001e432ba01efmr4342583plk.13.1712652156797; Tue, 09 Apr 2024 01:42:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712652156; cv=pass; d=google.com; s=arc-20160816; b=x/plKe8CrwjpvVomJT/Xg8NpvvlTkYgCNSmB1G7bHaANzPVZPihaEgyOrNisdW8wtV 0R9AkWypDJ7lSgctCt6Lq/bqoZKpvuXHU/8Irbpo8OHdUsFPg74DwI/ZuXQR632PZ/RE rI+dOV1F6FdD04PNpA2RTsgay0NyX1AgeUURRrmGAv2k6jYlsE/GCbloo7plyINLk9qA 1gkdP+4amA03I1Kv5UxIfbZK+8d1J/IltkMmhUDaCETRG5OTtwHJFUcBntzK4gRBrorR GRrPioziCpIQZ3B5F4tXE1qoDczpM4L69IlabimWL6y78SZeHJu9yww/rdzHuMh6oUdy P6kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=L8rf82IQCyfI7tQ6ip4On1i6SqbjEwwyBl2EsvThjlM=; fh=DsNI/d5+o/OZaG+s0ALXn2p0o5Sumkwz95IF7kKQlUo=; b=YTc+QyQn3Q9rZ69nQ+homXcNtzRY918bYX1Zbw4gVsC3awHSalZ5QfR0iikYuV5dGO 1OXM0wc9iczyCuhiJ8aVZiweDX373WmFfFFCjgGLPsNexxpvekiv5dPu9ErRy7d25poY Gmp0HsqnXhcBlYg0DVhayzlTY2i1lEz6gCi+9R+pesFb+1HhziNG3MWpAyTt6cugFkUB 0GCXkW1tNyAaoC0OcKiL+jRAF5/NCpqG5MBBcFxpOLOaVGiybb3ewM52knuIKn6UPSmU ZfdimNzp7TZa7hBy74yMZprOni130IYI6BirZXMDqHcuv4ulUxA/Fo0GPDjqr6KEum3D TGrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=niQ0i668; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-136494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136494-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t18-20020a170902e85200b001e4779c8029si2013304plg.60.2024.04.09.01.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 01:42:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=niQ0i668; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-136494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136494-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 7851328245F for ; Tue, 9 Apr 2024 08:42:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8129E74438; Tue, 9 Apr 2024 08:42:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="niQ0i668" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D4571EA6E for ; Tue, 9 Apr 2024 08:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712652139; cv=none; b=L96J52swlPJOPp1RfuubOGp+4yI0yiVICPEeSDBnC9rw2ABomjDyKC8mUOTFQzJiQuWoY9nngFZrodx3km4e5HtTdYi2IVlllj1BSgi4B33vR3Ngt76dg56jR/I6b0xLZoyCuHiU4ABkGVW8hDjZuTS1QBeKluoyWETyM0mNRDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712652139; c=relaxed/simple; bh=OunbLQg/Bt0NQZwIrgN1upoh3E2WELOEmAQSI9u6z04=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F5PD75lnJrsY0EP6WcBWgAkv1970hASzmB66i2xduLw60Jbk0cpw68v8uGk/4vhFwhnpD5z82z6MzETJ9pVXtk9MhIXMwSYcseHCwySvorYQKtSbdiNGVO/9pMONpaoBjoeZ2cyg6fy5BOOPkmgfZrpWAktq4hw8P6BM+HHK4HE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=niQ0i668; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a51a1c8d931so469139566b.0 for ; Tue, 09 Apr 2024 01:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712652136; x=1713256936; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=L8rf82IQCyfI7tQ6ip4On1i6SqbjEwwyBl2EsvThjlM=; b=niQ0i668m4dI4OgYN2vxLYHvqijvptya8LpMMpN+eY0dmdWRv1MUoCGUYm5tH+N3Bx TERTMoC3ffFjxYzNxLAPoR7HBus6Hgt/vX9fdNqVwltGTa7YUIwBY1yP4j9d9p/CYXIu 78ShJQto/Nv9+O6MU5tDEKLA1mBwhLMU2W8N2j3WEp8noUT5dsCefEriwXBlIL0LjZhx wyId25w1I0xRKSCgooXEiJyR7LKyEjKrQxPczWkJxdRC1BbT4p1fzQJ5VrGJDc7COC14 zpCQK9cYk5ojH43tezNq5RjZ5JVErr4erMnm2pWwZt7yR6q4DU52M981LQFqMMxWm2mj /ruQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712652136; x=1713256936; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L8rf82IQCyfI7tQ6ip4On1i6SqbjEwwyBl2EsvThjlM=; b=h/a8CiD/zo5gNeM1MfAGM0htLc7yhYyXGLgZXqX8KRA6PNUbawgtxQnBxxzv9wGkvV HS6PzA7uyu2GT5r4Og0XFaM38tu0ma2jAC29HrVemBNXqFVeO7MRcLTUCx6yKAVFzLxZ dX9MZIxoy9pqr7ZVvRgguXGzZrWcED5iLP3Lgpf6p8/M0rt0vjN3WBnUECzlyF+mbe8j QJgDJ7NA3YGyigolBNQ/MDkXlcCi50yFU8iZK6wE4kRQCOW9vfvaHrpl+MWKTT6mxHYi rsiXV64mAsUptFJeBAJhxKyoxj9EuABuVrKEMZkwjXKMfBuljOkbepVAY9el9yytkJ/U OorA== X-Forwarded-Encrypted: i=1; AJvYcCW9TokjvLei3dSKFdESwJA8cEdvwQeoYKwQvB1Imp7KcZW3TJJ2Z0LXhr+/WRwIqRxBiQHj5e4YMfXo+rxJmWp7aD2VjhzJMySyvuAo X-Gm-Message-State: AOJu0Yy31EsuWYzZRAaw06IrAU7+KL2+kF6MvDUEsvZTJyTAmxEyvN65 sdEKHFqaQXriqY8DRQV6fYVyqdHRQBz1O/I3CXBy4+MB3hXtoOww X-Received: by 2002:a17:907:ea8:b0:a4e:d43:dc4b with SMTP id ho40-20020a1709070ea800b00a4e0d43dc4bmr9478655ejc.58.1712652135767; Tue, 09 Apr 2024 01:42:15 -0700 (PDT) Received: from gmail.com (1F2EF1A5.nat.pool.telekom.hu. [31.46.241.165]) by smtp.gmail.com with ESMTPSA id qx3-20020a170906fcc300b00a4e26377bf1sm5497508ejb.175.2024.04.09.01.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 01:42:15 -0700 (PDT) Sender: Ingo Molnar Date: Tue, 9 Apr 2024 10:42:13 +0200 From: Ingo Molnar To: Thomas Gleixner Cc: Alexey Dobriyan , mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, Jonathan.Cameron@huawei.com, linuxarm@huawei.com, linux@roeck-us.net Subject: Re: [PATCH 1/2] x86/cpu/topology: don't write to immutable cpu_present_mask Message-ID: References: <20240407152643.3245-1-adobriyan@gmail.com> <87ttkc6kwx.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ttkc6kwx.ffs@tglx> * Thomas Gleixner wrote: > On Sun, Apr 07 2024 at 18:26, Alexey Dobriyan wrote: > > Workaround the following oops: > > > > topology_hotplug_apic > > topo_set_cpuids > > set_cpu_possible(cpu, true); > > // write to __ro_after_init section after init > > Duh, yes. > > > adobriyan: I'm not sure what's going on, can it set unset bit here? > > If not, then why does it repeat the job and set already set bits. > > > > Anyhow, let's not oops peoples' machines for now. > > Adding a bandaid to paper over the non-understood real problem is > definitely not a good plan. I take this patch as a bug report. > > Proper fix below. BTW., independently of the fix, warning about a too late set_cpu_possible() might still make sense - clearly it *can* be called too late by architecture init code :-) It's not a performance-sensitive function in any case, so the extra debugging code might not hurt. Thanks, Ingo