Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20736090rwd; Thu, 29 Jun 2023 06:28:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40+pxAtG5jlvPAEj5FcVIYoOEauqo4Nhr8fp18IYyLVHFG0XqTUysG/YWZ+23BWtrcjSmc X-Received: by 2002:a05:6602:2019:b0:783:5f71:5410 with SMTP id y25-20020a056602201900b007835f715410mr11242428iod.15.1688045316639; Thu, 29 Jun 2023 06:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688045316; cv=none; d=google.com; s=arc-20160816; b=ZeOrLQASBthEG2XXkg7SlRfz3QF/Y9Esbb8HoB3w1VXmu4+Tsw1sQViVgciDnCN9Ph LiJgrFwQf9HS20KHBjxWDY+TzbJvHu1WWio6CSE++iHeorOAmJz/J2Ue109tNcui/zof Lm4XboTGr1h1BSzkm9GDdMnmqGexYnJIr/PjT3CQL7+uKxt6mBWggEfLUS9Cw3rcIfgm AsxRMTKAwQ+9ZeQmxlHZRcxKK71FjykaahO3uGr8oyj0WJPHohfIKl//m8LOiG/ir5Z0 sdQNncnRftmAre6OWu3FS/wBNjruEYMopFlWxoAVCkfywDseq4QeQQkiDnvhXucCfd94 5awA== 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=i//cZqpn/yGjitEFiKBEUSmAX16ZZkd1c4DKwvAzqBQ=; fh=WD3ynr7OB6hBB0FoI5EgHTjXZehLvmXg0LFVRY1JHhs=; b=DtBuNpsV/1dd1VljrsgjhOEkLUAXp2LFQjKdhkvmsUjTJ0vCNSoAmnIQyJTsiU4E/0 JAl3LoGuey9YyU7QCqTecoS13OElqB6Hb5hhssVs0kFfmq+MWnhKuXgzctHV0iOGU2SB 4Vyds/u6PpxH2TAkPvOZLNXxI6C79nZtjwDJSsVfNbnDqw4VoMSCuht7d9IHyk4Y7Zcz SmbVyIMu2RZ14TtO3XtWgRnhtPg31PyflfKoPCjeEggHlJVqQ8OnZQREQs4LF1PoqmEH LKEzT0CKuUIcnusqt3rt1c+eYNugyplsuFv6eOwefQOOXErt9n8xc7zX5pFq5ZfRvoRV DulQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JSXvlkBx; 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 j15-20020a63ec0f000000b005538cfa80e3si10847916pgh.310.2023.06.29.06.28.22; Thu, 29 Jun 2023 06:28:36 -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=JSXvlkBx; 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 S231609AbjF2NZ5 (ORCPT + 99 others); Thu, 29 Jun 2023 09:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbjF2NZ4 (ORCPT ); Thu, 29 Jun 2023 09:25:56 -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 97AFD2707 for ; Thu, 29 Jun 2023 06:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688045110; 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=i//cZqpn/yGjitEFiKBEUSmAX16ZZkd1c4DKwvAzqBQ=; b=JSXvlkBx3HVdI9qj0MUw/mcx1zjp13bwPrBKdIlh7/ojR5oket5dNvhm95Bn/SUYxlKkyp qo0AukpL94n5sH1dSRkKSHK5N06AOsX23+YdgRh8FtcP2l90azH0FgZgztjvqgLhEBuOEF 0JLGqLMNWilOVA0y/+5IbKwKb35ZdUw= 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-515-hUX3LOjfMmS3X1r6h4jrfA-1; Thu, 29 Jun 2023 09:25:07 -0400 X-MC-Unique: hUX3LOjfMmS3X1r6h4jrfA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 756D23C18FE8; Thu, 29 Jun 2023 13:25:06 +0000 (UTC) Received: from [10.22.16.224] (unknown [10.22.16.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF97B2166B25; Thu, 29 Jun 2023 13:25:05 +0000 (UTC) Message-ID: <67d72bc7-a277-9210-6f40-d3d94f2643a0@redhat.com> Date: Thu, 29 Jun 2023 09:25:05 -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 1/3] cpuset: Allow setscheduler regardless of manipulated task Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org, Zefan Li , Tejun Heo , Johannes Weiner , Shuah Khan References: <20230629091146.28801-1-mkoutny@suse.com> <20230629091146.28801-2-mkoutny@suse.com> <15c607d9-c1fa-ca11-d675-8f2b3a6fd15b@redhat.com> <4fowzgkh7yo5ku2fsrptyi7jzikynjtq4zpfcx7k26vk4k6zj3@ubnupp5jqgle> From: Waiman Long In-Reply-To: <4fowzgkh7yo5ku2fsrptyi7jzikynjtq4zpfcx7k26vk4k6zj3@ubnupp5jqgle> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6/29/23 08:26, Michal Koutný wrote: > On Thu, Jun 29, 2023 at 08:11:33AM -0400, Waiman Long wrote: >> So I think you should just use >> cgroup_subsys_on_dfl(cpuset_cgrp_subsys) as the v2 check if your focus >> is just to prevent problem when enabling cpuset controller. > I thought the bare cgroup_subsys_on_dfl(cpuset_cgrp_subsys) is not used > in cpuset.c but I was wrong -- yes, I'll change this. > >> This change will likely conflict with the latest cpuset change on tracking # >> of dl tasks in a cpuset. You will have to, at least, move the dl task check >> before the security_task_setscheduler() check. >> >> Another fact about cpuset controller enabling is that both cpus_allowed and >> mems_allowed are empty at that point. You may also add these checks as a >> preconditions for disabling the security_task_setscheduler check. > Ah, I will rebase on fresh mainline (or do you mean another reference?). Yes, those changes have just been merged into the mainline. Cheers, Longman