From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 B3D603F074F for ; Wed, 18 Mar 2026 19:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773862177; cv=none; b=g3NlzUSFjFcpruGUMtIpYBcPt4uReCIAZCtD17KcMB7zxKGbpx84SXF87Zu1AVJoLT26gM2BZOKImDAt4zzHysuErwTORi6NlLp+nAmKQtgHr+K7sY+8n3UuUucnXwiZt0fh3U2DcanAWv1JC2DI8DKSsmo/X+hqeJ8qyzm6LNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773862177; c=relaxed/simple; bh=HNEjWWg+eFhY1R3/DXjm6+z8FMPs8I2QwA5CTW4Zue4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OJ/cUTYutgI0anjyMaMhw6zptq+j882/Kwo2OOstasQfi7r6B398kgw0TtM2kkX+nBL8AP8oNAjQqfA+DS/qbhPC0uqIJ2tEMGjhR+tV0myl8TZmHdjRlwsgzooUv0WRuDT2FTpwdYBKuN6dcvSiGfuMM/avedLF5QzQoE7OlTo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=N/zP/wmX; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N/zP/wmX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773862175; 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=mNDKa/Jl/+Ss4rYeY3MICivAnfJy5RYCpPz3D5LnUaw=; b=N/zP/wmXz+vMewDEmnf0z+aSAykz1zYL9qAXpl9xFFfhwfbJwe8bmq+mVc+uIkPG72A409 rndbCzeOh5HVKAInWnPZcQXa/8FBN6P8wM/smsNO27niK78leyZn7nfA7sUTnH2hZp9ieR UcJ0gF87zSuN0ui91Yx08+9U/F26A88= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-BzNYZuzYNK27-vUsJPNt5A-1; Wed, 18 Mar 2026 15:29:29 -0400 X-MC-Unique: BzNYZuzYNK27-vUsJPNt5A-1 X-Mimecast-MFC-AGG-ID: BzNYZuzYNK27-vUsJPNt5A_1773862168 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BC2F018005B2; Wed, 18 Mar 2026 19:29:27 +0000 (UTC) Received: from [10.22.81.226] (unknown [10.22.81.226]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 038C7180075D; Wed, 18 Mar 2026 19:29:25 +0000 (UTC) Message-ID: <22f1e3d1-3f5e-41cd-b7e7-6a0ee5c192bf@redhat.com> Date: Wed, 18 Mar 2026 15:29:25 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [BUG] cgroups/cpusets: Spurious CPU-hotplug failures To: paulmck@kernel.org Cc: Tejun Heo , Chen Ridong , Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, frederic@kernel.org References: <049415be-0be8-4e01-bba9-530e302bf655@paulmck-laptop> <5f142f48-653d-430b-90a6-400f87c88921@redhat.com> <8295a194-8f35-427a-8c02-97f2f648eb70@paulmck-laptop> Content-Language: en-US From: Waiman Long In-Reply-To: <8295a194-8f35-427a-8c02-97f2f648eb70@paulmck-laptop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 3/18/26 2:43 PM, Paul E. McKenney wrote: > On Wed, Mar 18, 2026 at 11:02:16AM -0400, Waiman Long wrote: >> On 3/18/26 8:53 AM, Paul E. McKenney wrote: >>> Hello! >>> >>> Running rcutorture on v7.0-rc3 results in spurious CPU-hotplug failures, >>> most frequently on the TREE03 scenario, which suffers about ten such >>> failures per hundred hours of test time. Repeat-by is as follows: >>> >>> tools/testing/selftests/rcutorture/bin/kvm.sh --cpus 80 --duration 100h --configs "100*TREE03" --trust-make >>> >>> Though a faster repeat-by instead uses kvm-remote.sh and lots of systems. >>> >>> Bisection converges here: >>> >>> 6df415aa46ec ("cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug to workqueue") >>> >>> Reverting this commit gets rid of the spurious CPU-hotplug failures. >>> Of course, this also gets rid of some ability to do dynamic nohz_full >>> processing. >>> >>> Now, the problem might be that the workqueue handler might still be >>> in flight by the time that rcutorture fired up the next CPU-hotplug >>> operation, especially given that the TREE03 scenario only waits 200 >>> milliseconds between these operations. This suggests waiting for this >>> handler before ending each CPU-hotplug operation. And the crude patch >>> below does make the problem go away. >>> >>> This alleged fix is quite heavy-handed, and also fragile in that if >>> hk_sd_workfn() uses a different workqueue, this breaks. It might be >>> better to call into the cgroups/cpusets code and to use flush_work() >>> to wait only on hk_sd_workfn() and nothing else. But it seemed best to >>> keep things trivial to start with. >>> >>> Either way, please consider the patch below to be part of this bug report >>> rather than a proper fix. >>> >>> Thoughts? >>> >>> Thanx, Paul >> There is a fix commit ca174c705db5 ("cgroup/cpuset: Call >> rebuild_sched_domains() directly in hotplug") in rc4 that may help. Could >> you try out the rc4 kernel to see if that can resolve the problem that you >> have? > It does, thank you! > > Tested-by: Paul E. McKenney > Thanks for the confirmation. Cheers, Longman