Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp114776lqo; Wed, 27 Mar 2024 08:18:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWme2niyVBChmD5dUI5F6sjd13gD0Q/U3ax5h3EQdDZZK3fUiOp5OchImXP5F61eW4mbBkGeRqySIRAW5hbQO5clRFAIoMMKt2dwP+aGA== X-Google-Smtp-Source: AGHT+IE6QQJLiCukiXW/Wa2s7D4Fe+5If+wREcs/0knjX7ksHCLK6RscFZgWyLmFIcjg5GozuizY X-Received: by 2002:a50:9f44:0:b0:56b:902e:b144 with SMTP id b62-20020a509f44000000b0056b902eb144mr81371edf.12.1711552717048; Wed, 27 Mar 2024 08:18:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711552717; cv=pass; d=google.com; s=arc-20160816; b=gi6BJAb+FX9EZFUOjbiFSBuCsSImQS8drbySe7GhGRQMlu/yR/MU/7YVf4+EcqucQk cK4pDHhY4UryW7KmIUw4mLKv0C2WzF777PzcFJ+kXrOLjGCRxRXGwCsNldNQCPjnPd+Y I7FjFQ8a0g4c+y/NZoWyukfMBiQxIVP+hdK5HdqUv7Q+OZr7uyRI4lilgJ+HAZBbPosl rIyig4xqB70YegGM97oH36UlX3GCR0fRtqtda87snrdAUUdhLJwT7QlQGXIwjkrGCAzf oo7MJrfN8f/9PAlqVqd6d5sxno7uaIe+U3EQFCMqLjBNijc1YrqOmdgGDWylISFu2Nle J0CA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=AexAAi3jOkUSVNodNAIXipjt4sVm4klRFg3i+A4ZqQM=; fh=/zQ00CzKBKZcYGKEv0AvcJXH9PDL64mfSUrM39D+f84=; b=arJISJirDfyuzYGEeYJlTyI8AO4310L1UT/eSN8Bm0cZUjMgxRPteELjXu7whabQPO P8XhD6XQp8DW3Ve9LaDeGi9Ioxlr83uw1W0F6Qs6REr7ySq6B09A+SIPVlDPku17AmrK DlG1FlUujPlvU34HyN+ngia7mANZdRGEBZUv4MpNNIQI5hPS4V5gEo4Nz3YZqjmM1Qgj c1BtVg6whQHjK5pdOxJMNshvfUsFIaMnjmpKGs9eZf+jF0IBtwidCFuoiy1xJ6/Cxf9g jzGp092OcxYT+aHB4AWJ6DwbvrVRXKDltqc02H7HHynruayK00VvpRuZ7UUj+SqQHEDl /6sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QO4hdwZi; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-121437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q29-20020a50aa9d000000b0056beaa1c108si4630963edc.579.2024.03.27.08.18.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 08:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QO4hdwZi; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-121437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9A7791F3649E for ; Wed, 27 Mar 2024 15:07:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B10412F37E; Wed, 27 Mar 2024 14:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QO4hdwZi" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 9824A12DD85 for ; Wed, 27 Mar 2024 14:29:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711549744; cv=none; b=VK6DPrCKqZA8dWKanqhimc7MS0kco+K93GRor0+opSRFQN7oF9Pl9R2Hi9FQVYCDaHIu6UH2OBVUoDBSsqXZIkniU+slHNL6ld+6b05w3Zsf8DT4Th/hjNAQRGna4Ci7e3KXgpDQS78qWiICPKRf/Kn75eNUDq0hykImQkV82jE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711549744; c=relaxed/simple; bh=EX3bB2tIvlR70TqSvY9a5kiFkuRf6H6igFYKBi3vo/M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=SO3FWxBeiHzmy+YHz18SWQ75Qs9cbG9vA2WMZnOkVNUooHB+0KLCaffeqZDpsjdIj4TfQrDi7awKFmTXzKqYDxi/h7Rcnvcht0eSUzeQpVM9dTfiRKJRB9X3g21QxPr/J+7q3AaEWSEt/LO02xI2UkHsBy+TAd9DhGeSWyxm1kY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QO4hdwZi; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711549741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AexAAi3jOkUSVNodNAIXipjt4sVm4klRFg3i+A4ZqQM=; b=QO4hdwZiryuqcpi6ZeLKJ7PVdjlQME8RRhQogjp4PdpGGWO4YYBOrnFccSRru7EQn/Em+L wa8O8tvZ52//KfQhRwxcv/7XlBNlZqdm/IXDlvdOC2BLtjNFKdZXFPHcyKmaCnIdnXetMC bOzXIDkJeDC86fT7fUTlabJV77IyA6E= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-fVR1VVGWOCqk5MaER7vfYQ-1; Wed, 27 Mar 2024 10:29:00 -0400 X-MC-Unique: fVR1VVGWOCqk5MaER7vfYQ-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2d478badf3cso58285771fa.1 for ; Wed, 27 Mar 2024 07:28:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711549738; x=1712154538; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AexAAi3jOkUSVNodNAIXipjt4sVm4klRFg3i+A4ZqQM=; b=Ps2CcoByrC2DU6vr7u81ykpX+6cL0nu2HMLEz77DPX6FBZU6cs87p5GwTmvxyU2vIr gjti6GHTD7h3gdTIutrwF6rOcgmPdxWA28bcTWyyFIzkx9cZQ71Y4xomQpVXOXUv6lVM luPFt/ALYUQpZ2AIqtut2td66CxhKNhIieh6+mAAdpnuIJ6WrXxd3mzWYo/kZTsfKXPR bDqqzg6uysZSPpA3DLJzI41yLiB9lo5OiHsX8yIpctII6qvH39UrQZfKjeAUL30F9Nwt ddOoHODIW+lH8XVQQcU3WQGj/bsUjbsaYTRrzCncG41ahSaWaHFDH258jpftJFAoSp1g T58Q== X-Forwarded-Encrypted: i=1; AJvYcCXkWwnEKK55F7JkMoHXDyRFTbCOe0X994VeXNNKlKJRJz8MM04tJDCIDVDWjpN/N1FyxeITz66S6+9uqFvLsBaCo5QLArItEAEXRIcT X-Gm-Message-State: AOJu0YymJGOgW/apmKUezb4FWu0hw7DlyJgaMgR79aP9aIF78gvv2Cu7 v79YLYjF+yn4OUMlL5wfTfw73O7tSG+xq3YFqkGWpK4+5vBaMFAcNNKWSgCZnXbo1CKrrMkp0Oa L1TCnL0btx+sV7M1OKZt7wnV+BP7eXERg7WekoBpo24Gvs+ZB9Lbn3y/y+37yjw== X-Received: by 2002:a2e:8689:0:b0:2d7:b:da37 with SMTP id l9-20020a2e8689000000b002d7000bda37mr164407lji.7.1711549738457; Wed, 27 Mar 2024 07:28:58 -0700 (PDT) X-Received: by 2002:a2e:8689:0:b0:2d7:b:da37 with SMTP id l9-20020a2e8689000000b002d7000bda37mr164384lji.7.1711549738060; Wed, 27 Mar 2024 07:28:58 -0700 (PDT) Received: from vschneid-thinkpadt14sgen2i.remote.csb (213-44-141-166.abo.bbox.fr. [213.44.141.166]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0041496b92502sm938084wmq.31.2024.03.27.07.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 07:28:57 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker 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) In-Reply-To: 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> Date: Wed, 27 Mar 2024 15:28:56 +0100 Message-ID: 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=utf-8 Content-Transfer-Encoding: quoted-printable On 27/03/24 13:42, Frederic Weisbecker wrote: > Le Tue, Mar 26, 2024 at 05:46:07PM +0100, Valentin Schneider a =C3=A9crit= : >> > 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=3D200" --duration 2 >> > >> > And the warning triggers very quickly. At least since v6.3 but maybe s= ince >> > earlier. Is this expected behaviour or am I right to assume that >> > for_each_domain()/sched_domain_span() shouldn't return an offline CPU? >> > >>=20 >> I would very much assume an offline CPU shouldn't show up in a >> sched_domain_span(). >>=20 >> Now, on top of the above, there's one more thing worth noting: >> cpu_up_down_serialize_trainwrecks() >>=20 >> This just flushes the cpuset work, so after that the sched_domain topolo= gy >> 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... > >>=20 >> Maybe as a "quick" test to see if this is the right culprit, you could t= ry >> that with CONFIG_CPUSET=3Dn? Because in that case the sched_domain updat= e is >> ran within sched_cpu_deactivate(). > > I just tried and I fear that doesn't help. It still triggers even without > cpusets :-s > What, you mean I can't always blame cgroups? What has the world come to? That's interesting, it means the deferred work item isn't the (only) issue. I'll grab your test patch and try to reproduce on TREE07. > Thanks.