Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp866791rwl; Wed, 29 Mar 2023 09:25:21 -0700 (PDT) X-Google-Smtp-Source: AKy350axQ8q89aXd9TiAmalbrngalhglPpasVWxFb4xtzyR/H+AsyMmGTTTwtP+JzbZuyQPWFGr9 X-Received: by 2002:a17:907:d047:b0:945:2f54:5eae with SMTP id vb7-20020a170907d04700b009452f545eaemr10045029ejc.77.1680107121318; Wed, 29 Mar 2023 09:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680107121; cv=none; d=google.com; s=arc-20160816; b=S4wZYxwogQIIFxcMPKXU/oZRzIbvJm8UhsdVRZLrUZmx+hxxYqWeHxsFwegMSVeOSr imF2fgHGWRH1T8AJYacP6hliGMYrW8/NKWvFYF9KwVbR0B7WSoTVmFr8SS6oibMELM8A X03l5F0bMczHkFC5hjEiU19mYEuHecYe0T1HFv/MbhlDuh2oBinPftq0DSD9nquA1rR/ +oY3AyENzS2ylYQY1mCv7AQuVdXeyQj6jYIMZ/L50bFYAPHVFJ0jkhML+zdsODc1qH4r qCp1LNdFvywV3ItaMTzDMqDdFQMWMijNqxQQXcbJI+D/kgPgkKCQoZQu0dZk1EZvOylp 6iNA== 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=BK4E10sij+UjBr4h6hMh56nRJwsX+E/yiWATUoPCWNU=; b=g7VF2olVcan35ACHsStpOrTMoPy8BwFBVqJ7kJrNwflCFjvJzGj51mvEvChJtxqeTx 532jolf/eMsgiUtMXIZb/echQO3RyeHmisvh0GNfHpHScH/JBtge9eWAMua9lJhX2dp9 7leEqFvc6UmcUCwVmKswcs3PloQUGlpivZIQ3EYZqacOLXV47BF+h/FM9pa3n4s2zsc2 ZoSF6qlPfhgNbKTDjc1VZm8mxkLL1eB4ib+cDbhvTp4xdd5pF2KdpwdZVq7rRVlccow9 ZjvrRbNW6EQSUnKZBXTO2+pnfyVKAwvQ+44OJ/P9QGBTten2/G34Rqk5QKRxIKtJZnaI TdLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A1Z6QAD8; 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 hp7-20020a1709073e0700b00932e6d5bd8asi37618841ejc.980.2023.03.29.09.24.56; Wed, 29 Mar 2023 09:25:21 -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=A1Z6QAD8; 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 S230478AbjC2QIM (ORCPT + 99 others); Wed, 29 Mar 2023 12:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbjC2QHy (ORCPT ); Wed, 29 Mar 2023 12:07:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D6461AB for ; Wed, 29 Mar 2023 09:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680105928; 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=BK4E10sij+UjBr4h6hMh56nRJwsX+E/yiWATUoPCWNU=; b=A1Z6QAD8mwzAEuiqGjwBXcJt8T04RhYf9xMsoFjxa+MzOOW8peDIivymCBWgZEoaOJcn5Z pZYFEqDcPQoAlBqfHLa5VICq3Xu47kDfo8TKcSxUuU2OYCjfJdtwBVBmo3Zp0PRXsk9h9P nsMnS89Toz/40Jz6CmRKuIycXBikYPA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-541-5kwB7d74P1WUzrrEszAoSw-1; Wed, 29 Mar 2023 12:05:22 -0400 X-MC-Unique: 5kwB7d74P1WUzrrEszAoSw-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 8C33E855315; Wed, 29 Mar 2023 16:05:21 +0000 (UTC) Received: from [10.22.34.224] (unknown [10.22.34.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73F48492B00; Wed, 29 Mar 2023 16:05:20 +0000 (UTC) Message-ID: <0eae9e7c-8bfc-6e89-c4ad-e1cd40ec03b5@redhat.com> Date: Wed, 29 Mar 2023 12:05:20 -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 6/7] cgroup/cpuset: Protect DL BW data against parallel cpuset_attach() Content-Language: en-US To: Juri Lelli , Peter Zijlstra , Ingo Molnar , Qais Yousef , Tejun Heo , Zefan Li , Johannes Weiner , Hao Luo Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Dietmar Eggemann , Steven Rostedt , luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, Vincent Guittot , Wei Wang , Rick Yiu , Quentin Perret , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sudeep Holla References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230329160240.2093277-1-longman@redhat.com> From: Waiman Long In-Reply-To: <20230329160240.2093277-1-longman@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-0.2 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 3/29/23 12:02, Waiman Long wrote: > It is possible to have parallel attach operations to the same cpuset in > progress. To avoid possible corruption of single set of DL BW data in > the cpuset structure, we have to disallow parallel attach operations if > DL tasks are present. Attach operations can still proceed in parallel > as long as no DL tasks are involved. > > This patch also stores the CPU where DL BW is allocated and free that BW > back to the same CPU in case cpuset_can_attach() is called. > > Signed-off-by: Waiman Long Juri, this patch is an addendum to your series to address the issues that I found from the cpuset point of view. Cheers, Longman