Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6062273rwl; Tue, 4 Apr 2023 07:22:34 -0700 (PDT) X-Google-Smtp-Source: AKy350aBe/LyoycD0+rzje3ygu0R0WUoa+FDA2AT8/K3ZuLIiRRJacZzwv5FUUKLJpc9Fg6Xrcrh X-Received: by 2002:a62:18c3:0:b0:628:1852:7343 with SMTP id 186-20020a6218c3000000b0062818527343mr2290855pfy.2.1680618153995; Tue, 04 Apr 2023 07:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680618153; cv=none; d=google.com; s=arc-20160816; b=LqZi2EC75J6JgFLvG+K1oYjdAcGPNYeHN8Vdh6TZstCW+eUXShjI09maQNGFzGaJFh a/fqY/Id4zo7bZKBNqNS1VGkN74W9a9OIe6Q6EhjmAXNwrvXdPh3dW7ldFpLGhptJ10M JzvZUzXWQZtTBqjoUxDeLimCT8MJS5Qk77muUexuqFT7aASM7rndCbqEAfYYCLWfeO4I DN1mT6AG27OqXXHOTs7UxMW7aOcSJKwJI+oT3+SucdwTBqQIN9IpmjmPec62l0jG4Ywa 82ufVCIIoIqf5zUq/XL/rGXA1kCs0yeym4R+h2RCosLo6ktTVejmw5ocddphtC63Vu73 gE5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pHnav7rmFyKZwzKMs7eXEGCo+lHgh/MyPZc+xhNZR/U=; b=0sjJXTIcJLhZX6HS1XZiid2dfy93Q0r2dz/vZt2YPM65q0Jt+J2U6Zikia/flg3yxV mkbclPu+ZsDq5ach989WfMWcKOC1Dzos5cipd7TMdMFGju9E+TL0Jfu+2dsWH/BZxyxx zDm6J2D/ELgpI8ou33Epid9VPeXRrKIJmE6uqoDl+xBJzjcFv+yLW7jQF2LVLvDvSJnq c85MAxyRtyv04df76BoYvjpokXxZZQ4K/GvCf1C7ZNbPTbV9TAItrv9duuZGVdAEO22s SnvST8gpzkh8wQgEMxvf9+qAS9/0kr4ZRMIxyGGiOQvMcedBEPkhdv5ICpf2VIDPLtnM g0oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JCNXS+4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63db58000000b004fb165e159bsi10413383pgi.794.2023.04.04.07.22.21; Tue, 04 Apr 2023 07:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JCNXS+4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234487AbjDDOOi (ORCPT + 99 others); Tue, 4 Apr 2023 10:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235271AbjDDOOe (ORCPT ); Tue, 4 Apr 2023 10:14:34 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D9D4486 for ; Tue, 4 Apr 2023 07:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680617575; 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=pHnav7rmFyKZwzKMs7eXEGCo+lHgh/MyPZc+xhNZR/U=; b=JCNXS+4l+0Ei1UeH67M6gWdNsxSw7u/YXFGrBymLVcx6ndZca13B89z3zzanKMWHu6feeP dj4xsWu6kmOTuGj0h2Pk1bL1WdKyxwyYSLwG1Pxsz/quVU2C13zcPN+OY5KG8Y5vM+aEzH P9OFvya3cMUeXciyqsEJaMF3sF3n5XU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-eBD4KOx6P-yw9rbEwUxkLg-1; Tue, 04 Apr 2023 10:12:50 -0400 X-MC-Unique: eBD4KOx6P-yw9rbEwUxkLg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E61553C10EC6; Tue, 4 Apr 2023 14:12:49 +0000 (UTC) Received: from [10.22.32.153] (unknown [10.22.32.153]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2FCCE492C14; Tue, 4 Apr 2023 14:12:49 +0000 (UTC) Message-ID: Date: Tue, 4 Apr 2023 10:12:48 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 3/3] cgroup/cpuset: Allow only one active attach operation per cpuset Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Tejun Heo , Zefan Li , Johannes Weiner , Christian Brauner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Juri Lelli , Dietmar Eggemann , gscrivan@redhat.com References: <20230331145045.2251683-1-longman@redhat.com> <20230331145045.2251683-4-longman@redhat.com> <20230403164736.lpjdpzxxnjlpxrqv@blackpad> <24b67530-62ce-4f9c-7b74-d41d2ccc710e@redhat.com> <20230404090737.3g3uxga52bojgdu5@blackpad> From: Waiman Long In-Reply-To: <20230404090737.3g3uxga52bojgdu5@blackpad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/23 05:07, Michal Koutný wrote: > Hi. > > On Mon, Apr 03, 2023 at 01:41:33PM -0400, Waiman Long wrote: >> This patch is actually not related to the CLONE_INTO_GROUP problem in patch >> 1. It is a generic problem when multiple users are moving threads into >> cgroup.threads of the same or different cpusets simultaneously. > I meant this: > __cgroup_procs_write > cgroup_kn_lock_live > mutex_lock(&cgroup_mutex) > > and (more succintly) > cgroup_update_dfl_csses > lockdep_assert_held(&cgroup_mutex) > > Even the threaded migrations should be synchronized here. > Can you please explain in more detail what's the problematic case? You are right. I missed the cgroup_mutex synchronization here. So this patch isn't needed. I will drop it in the next version. Cheers, Longman