Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2780168lqz; Wed, 3 Apr 2024 08:24:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKIhxZR61XJTEKjTyvVmWIh1fP5F8mfVyH0ulKISO0qL32VgfhxMQcBhRA1GcbAU5kf3cajHvAjt940jEcj5Nk7s42CxDAR/oLGaZpqg== X-Google-Smtp-Source: AGHT+IErsWlrfQXRXTsvsul5ukSzVYdQufiL0IOUDR4Hzf/pHNHYpgQIa8f48Y96CEqqoLP2xd1Z X-Received: by 2002:a17:903:8cd:b0:1e2:588:7737 with SMTP id lk13-20020a17090308cd00b001e205887737mr20921997plb.24.1712157866719; Wed, 03 Apr 2024 08:24:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712157866; cv=pass; d=google.com; s=arc-20160816; b=zYoDEPUkkb9Oq6U9dM4ROwZ/+kOEqQVo6bfjf5YH59EtRtE1hHbetwXTgcZkvWNRb0 MbMMqggNbXc/2oH5z2P5azJa7QCl2XyxeuHEYWUAHBYgOwtKQsItnX8APoWRNOCDT/gz k8AkygYnBvTL2ltOTiUebELDmfRiN+x39o8drVHJ3U0JWkMiyJKWlw8OyPbeX/2gqBZS Na0+vox185TLc64tA4Al53jp/WATUIhGhpfCZW9h3y2HfgxGuIZ8utRmDG2jzwYs5GqH WLG7MuQRWtmzcZUi8SMquu+eCze29sTQS3YGUFBiVt32x8gGVtLA67fZePYXUlXCuZAp Sr/w== 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:dkim-signature; bh=L0WbLD5l/t9iedAnyVn1INK22TgmOVbQD9aZe2QlLvI=; fh=FLfFknFeEpOEVTlTrIgBeDDVqBO5TqScGkKyhE+9KIM=; b=GHDSZqkBs2cznJ7W20S6o4Wt5D7EyQ7frrsRDYb0XrR837i8okqW9gP+KSzbUhnNQb 2gdKQ5k4weNyEoFrcLQ2RuK94pOp4lM0QXESQvbquaFzpV6uf78oFgAMv5NbuNbyJe35 102KCxxEh8sYRz71/O5gBIUCzsBxETg/RNQlr3rQwoSEDJeDv01qV5Gism7SmW90RTUd GB8qqNx0DPxeO+XqzNXTB3DAJmNeArK7hKf3fpk0kBFjNr2cV4n7q5mXZxiTbEqBjn5P 6mDCIOq0k/Ve03muGFkRxPhH1EFZVqxzltVFNoH1Ma2o4qIrFwmoh6WPeh2tKADisJbv /Tgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pN9EiLN+; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-130007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a12-20020a170902eccc00b001e0b5eee82asi13764785plh.457.2024.04.03.08.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pN9EiLN+; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-130007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4AAB0B2A3EE for ; Wed, 3 Apr 2024 14:54:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3701785C4E; Wed, 3 Apr 2024 14:54:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="pN9EiLN+" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 82F93148FE8; Wed, 3 Apr 2024 14:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156069; cv=none; b=pBSFSuygiIdZ6mkJI90qMD674gKm8pS+i33SsNk5PsxNJNaEfXPV34iwI+ljRSb0y7zbJTKq8FKxW6x4sXUXQ/36fJQhzMsN29FiHfzDMDxVtiM8Tf6yWv0+pEiFSxGWEiLEO0ZgE8Gho+/N6/agAgxYK/LqZ4ulH89uQ/e3GmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712156069; c=relaxed/simple; bh=FiNmi7tHU8LCxNQpULgn4kNN5KVMjzNkfB/llFUlLW0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X8cFcaAq25dMkcrnq7SwPRwKWMYJrILGwyw5FKdtlELxzmk1/CFCrruj8hx5yHByCol7xrAXJoq5T6BlKkTA/VjEV13x4fKKidBCqz+mDJJf2g+hs+wKxnNKxGulzcaZUqHRUriC62Z9cavEssElNBkP+FwcHAsdobHMUEeHsiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=pN9EiLN+; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A03A9371BB; Wed, 3 Apr 2024 14:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1712156065; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L0WbLD5l/t9iedAnyVn1INK22TgmOVbQD9aZe2QlLvI=; b=pN9EiLN+i4rF1gJsFqxla+MO3HuIbs0l6XLPl+uROOaIHhrUJiGYZpphGQwbFz6FOvT3ji xlm2JJg9V37LdzAd504GUH9LqXvO4+TBoN8mdf8LsgSrzQrQThZ8nUGt+Ba9dW7BEHjPlp diTzeU0eOQs7bKO5ijG97x9HyZ/6Dtw= Authentication-Results: smtp-out1.suse.de; dkim=none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 8A00F13357; Wed, 3 Apr 2024 14:54:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id BeB+IaFtDWZ+aQAAn2gu4w (envelope-from ); Wed, 03 Apr 2024 14:54:25 +0000 Date: Wed, 3 Apr 2024 16:54:20 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Valentin Schneider Cc: Waiman Long , Tejun Heo , Zefan Li , Johannes Weiner , Thomas Gleixner , Peter Zijlstra , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Shuah Khan , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, Frederic Weisbecker , "Paul E. McKenney" , Ingo Molnar , Anna-Maria Behnsen , Alex Shi , Vincent Guittot , Barry Song Subject: Re: Re: [PATCH 1/2] cgroup/cpuset: Make cpuset hotplug processing synchronous Message-ID: References: <20240401145858.2656598-1-longman@redhat.com> <20240401145858.2656598-2-longman@redhat.com> <548efd52-e45f-41fa-a477-bc5112d7b00c@redhat.com> <7e62b37d-6c9c-4e55-a01a-175695475cb5@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4oauttmks2s2kyvd" Content-Disposition: inline In-Reply-To: X-Spam-Score: -3.72 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spamd-Result: default: False [-3.72 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-0.993]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(2.20)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; BAYES_HAM(-2.51)[97.79%]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_TWELVE(0.00)[22]; FUZZY_BLOCKED(0.00)[rspamd.com]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_IN_DNSWL_HI(-0.50)[2a07:de40:b281:104:10:150:64:98:from]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Rspamd-Queue-Id: A03A9371BB --4oauttmks2s2kyvd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2024 at 04:26:38PM +0200, Valentin Schneider wrote: > Also, I gave Michal's patch a try and it looks like it's introducing a Thank you. > cgroup_threadgroup_rwsem -> cpuset_mutex > ordering from > cgroup_transfer_tasks_locked() > `\ > percpu_down_write(&cgroup_threadgroup_rwsem); > cgroup_migrate() > `\ > cgroup_migrate_execute() > `\ > ss->can_attach() // cpuset_can_attach() > `\ > mutex_lock(&cpuset_mutex); >=20 > which is invalid, see below. _This_ should be the right order (cpuset_mutex inside cgroup_threadgroup_rwsem), at least in my mental model. Thus I missed that cpuset_mutex must have been taken somewhere higher up in the hotplug code (CPU 0 in the lockdep dump, I can't easily see where from) :-/. Michal --4oauttmks2s2kyvd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZg1tmgAKCRAGvrMr/1gc jkuBAQCOU5ydo9y0TCnjqjAp/O4I1OLjgDDV/yffUbpaHCtEQwD+JkXKjW2H8u/w FTxiJwyMy2sI6p0otQdxSBa7Bpu0Vgs= =vBqH -----END PGP SIGNATURE----- --4oauttmks2s2kyvd--