Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp70969lqo; Wed, 27 Mar 2024 07:15:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNMfkBZXi4jjDLqN7bC8dwD98q87S25WLjhhGolWwL4ra3Xnripus6qCIKnPF5ZSoEQSAURXDZ9KMppwpJXCybD/PEwbXQA52INUSRdQ== X-Google-Smtp-Source: AGHT+IHkQrSPNUht6KaV+tSWNpTvP38/pM1n2vIQIpGj+S8W6vnmUYrpuDJmiVdlQkP3txBmULFy X-Received: by 2002:a05:620a:1210:b0:78a:2a5f:8557 with SMTP id u16-20020a05620a121000b0078a2a5f8557mr4156890qkj.42.1711548917903; Wed, 27 Mar 2024 07:15:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711548917; cv=pass; d=google.com; s=arc-20160816; b=w5mBXkdYF/B4zU7I0agxTu+tzSrUd9f58aAZ1EUboGAWc9HnnVyc0NX1n7cpwML52O Kg2n2dbR5uM2bG3EdDQDz1UpBgOLWPETsDjMToGX6S3DdlVp7PlHPB5pBPPiys1sLYX1 dCWoyKI/OBk9AC86RjbGOIdapT/nCT42O2TChwcZxAHpx8q88MavEUl+gM5YJnn4bg6D q8wRCDkYxBSzz2x/zTgE0XayFJLgfezfgHExHaczTDM9HNdfuJVUilkoUD3e4yWDJ57F xO8xlFvqM0ngKjLALLOWT5Fy0bwUSfAFNguh0WeuzymLTfGJ/VzfIa/Z/QPait8RDcb2 j8VQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YsciyhDfk2YkHWhYp/WraQNoR8SwHOLXPg07cjndYrw=; fh=iNSSX77ycKB7cEl18NIiWjvtwFHb6V/rTpS/4uKZ+eU=; b=HVIv82JOnpcMQ6xwUWwMXpRKgMEKTrA9I4d4Adrj7p/mwgS67xMPegQSS/6nZZ5DvW 22pG1GNEaOnhUMBITjmxfQ0P5EBOaDzMNIFkwr7NbDW/ryXJTyyIOwMKVO6r7savLKjM Tpe1jdmwH1hhN8JuuWDRzap6e9IQP26rTWvtI9mY6ew4vofO4NTpuxMAs/9YVsArCuzi S/SIQuUV5iSt6Dr0Y+C25roNNy5c+nqky+7GGo/R05anGhLRbOuI8kTZN9631m5Y9JuO 4jYyrNte3bOSiLafqjnQnPOBn8qcV10Kc0RWVhDWZerfccNLPak0SbZuadK7pIWY2L4L H7DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=geDSCJnN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-121298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f23-20020a05620a12f700b0078a65bfef07si3338824qkl.656.2024.03.27.07.15.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 07:15:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=geDSCJnN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-121298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121298-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9F9C81C2C17F for ; Wed, 27 Mar 2024 14:15:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29BFB146D7C; Wed, 27 Mar 2024 12:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="geDSCJnN" 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 A92F4146D64 for ; Wed, 27 Mar 2024 12:42:25 +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=1711543345; cv=none; b=OywzTR4LAxqH4PmiT4Dz1xdJ3hQDpsVoqhOh07Su/4+ZEaJMYYTm5xIKKeGRXpI75QIWWg6kl7XmUtiUfFqFPtUTrigi8jQp9KEa+0ASlW0j9PLZAAwpPlIWqX7K/KLgWYJEdt8UnMZyKGrOLElvz70W/4xzb9sgdEzdZrFbGoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711543345; c=relaxed/simple; bh=fIUWXJRrxbtYXLlSLOpvxXJLHkM+ks7iBm6J3zBbb3E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KW3qCNTZNo634tUUu0MRidyvZ9pwH88bvrEAxSmwYZQ5p5j7Le2E+zz5PUnNVCw79G4pNOC6LgYo0t5NwqaCAMNLia5tEtLWMvgzBP65jfBfs0eHxgs15cKtK7iQez4RgtH31Qd83X7Cb+jqyw+iTGxvRgmszRI2yuSp9wLYFdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=geDSCJnN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 804BEC433C7; Wed, 27 Mar 2024 12:42:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711543345; bh=fIUWXJRrxbtYXLlSLOpvxXJLHkM+ks7iBm6J3zBbb3E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=geDSCJnNZPAPoorLnoR/kJHCntkR91w2/ZmB+UdHCYY2jMce7bYFtuhaoQYpDj5ha UfhU5VefCdAdiipbGWDmfAGmHv9fdZPj8vJsVbKzJ9NLP/OTgTzXUiki/PJH+BR5L7 edOf4S8w0PfQ3deJSVcztt3zytaN32fKVr8Pir+wwN98qBtkqcxpH5pHF2KlcKMlv2 5cZYZyIUP7aIo+qtKKsqXIsLLBkaz/1iQBRyxqYPW8A6o5XGU+UYSTrCvTkpHoENld QPihyCh3ERFG3qw+U5js0R2Bh6jlNAu+23UV2fYy9My+6U7Dnl2s+mUZm/TGIGswTk 3DwTwymT8Sa4Q== Date: Wed, 27 Mar 2024 13:42:22 +0100 From: Frederic Weisbecker To: Valentin Schneider Cc: "Paul E. McKenney" , Thomas Gleixner , LKML , Ingo Molnar , Anna-Maria Behnsen , Alex Shi , Peter Zijlstra , Vincent Guittot , Barry Song Subject: Re: for_each_domain()/sched_domain_span() has offline CPUs (was Re: [PATCH 2/2] timers: Fix removed self-IPI on global timer's enqueue in nohz_full) Message-ID: References: <20240318230729.15497-3-frederic@kernel.org> <464f6be2-4a72-440d-be53-6a1035d56a4f@paulmck-laptop> <1b5752c8-ef32-4ed4-b539-95d507ec99ce@paulmck-laptop> <6a95b6ac-6681-4492-b155-e30c19bb3341@paulmck-laptop> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Le Tue, Mar 26, 2024 at 05:46:07PM +0100, Valentin Schneider a ?crit : > > Then with that patch I ran TREE07, just some short iterations: > > > > tools/testing/selftests/rcutorture/bin/kvm.sh --configs "10*TREE07" --allcpus --bootargs "rcutorture.onoff_interval=200" --duration 2 > > > > And the warning triggers very quickly. At least since v6.3 but maybe since > > earlier. Is this expected behaviour or am I right to assume that > > for_each_domain()/sched_domain_span() shouldn't return an offline CPU? > > > > I would very much assume an offline CPU shouldn't show up in a > sched_domain_span(). > > Now, on top of the above, there's one more thing worth noting: > cpu_up_down_serialize_trainwrecks() > > This just flushes the cpuset work, so after that the sched_domain topology > should be sane. However I see it's invoked at the tail end of _cpu_down(), > IOW /after/ takedown_cpu() has run, which sounds too late. The comments > around this vs. lock ordering aren't very reassuring however, so I need to > look into this more. Ouch... > > Maybe as a "quick" test to see if this is the right culprit, you could try > that with CONFIG_CPUSET=n? Because in that case the sched_domain update is > ran within sched_cpu_deactivate(). I just tried and I fear that doesn't help. It still triggers even without cpusets :-s Thanks.