Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp648135pxh; Wed, 10 Nov 2021 07:22:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHxE1f7KvlCtKzPs+yTDQZuNy0BDbnQJId/G7/lQ44vSJR9/m3KqrUX3rJ8P3Jq8RwG4NL X-Received: by 2002:a17:902:ced0:b0:142:189a:4284 with SMTP id d16-20020a170902ced000b00142189a4284mr16796544plg.79.1636557762017; Wed, 10 Nov 2021 07:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636557762; cv=none; d=google.com; s=arc-20160816; b=bfg4GCaRMN0YnWgtVuStdu7JpRAg0mLsaEow9pvpndq0GwIwNljXviddFGXItQBlP3 TzlToGPti1jjXfhflrMcryq1OF1TNH2o6Ee09HMdSCN6YkyWHppJB4RUWxtqp/n+b2As MxlpoCZZAG9Wu6iOUHx2Cfn/XZQqM0Hxs5FM01bdDsuejTnizzXRVvf3G3we0Aq8TKIT JBnergGFRyVld7ReDRY/Uq3043KRbo28nA0J29fADQLg21n6vs1aEt7LMJ23jiiVBWbp WVvpazsKpy0sCVcafv3ilqjD3h6uMIPXGVO6siGecQ+VRfqiqR+/0ITenrpuZN7tql96 yJpA== 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=Lhjq4wAJfTAQzB4aUh8/HWQOCKwr9ITogKZbi8YswJA=; b=XaqLa7sIehDQltvIDEWDkxpGbkBt9iNa8K9/bhDy8GvCKRMi1Mp7Hq981D9wHUP1hu WqZf20g7BZcCLZ/y9UiHUsm7zh/IZ46ypvauGh3juFhKFpg8K80yGdVIY4cpB+WRwHvf bNNGo53bz6pSpFCWMo2ZPRJOGe+lMIfRRu5vqcsBbS1lh+Qxvk9iH4o/x5Og8xwhv1sU obDsxlSRHlQFNv1BPtPhwWYVfu1zGv4m7lYV5oga/FkwJ3obzvYfdhJSamJ1Kjdu5MIW 8oVa239xuUmArO9L9fIE6PjBgza9cwMKMpnodTmWeGrW/oFNnoMIkGaTmkKc9SrZdCUd q07A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i/HnP+j9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si24685pfc.336.2021.11.10.07.22.29; Wed, 10 Nov 2021 07:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i/HnP+j9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232298AbhKJPXt (ORCPT + 99 others); Wed, 10 Nov 2021 10:23:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44413 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231148AbhKJPXt (ORCPT ); Wed, 10 Nov 2021 10:23:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636557661; 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=Lhjq4wAJfTAQzB4aUh8/HWQOCKwr9ITogKZbi8YswJA=; b=i/HnP+j9EaFVfwS3UGABgU+7UWyvEboiNAwF4zoBZzulT8KFitAK+ZyIDgmKGrzpGC+vH/ v2ATCj14b4xuYIbwAxqAXnZ2mEIoo4WVIbzZ3j8so81xYfw/uHy4YUo8jt53n3tWqR60hA aMlYuVkw7u35u2QuJZqJFuz/Ua/viXo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-QeCXEl5YPDetK4CXDZDdEg-1; Wed, 10 Nov 2021 10:20:57 -0500 X-MC-Unique: QeCXEl5YPDetK4CXDZDdEg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE4291B18BD3; Wed, 10 Nov 2021 15:20:54 +0000 (UTC) Received: from [10.22.11.131] (unknown [10.22.11.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13BDC56A87; Wed, 10 Nov 2021 15:20:30 +0000 (UTC) Message-ID: Date: Wed, 10 Nov 2021 10:20:29 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v8 0/6] cgroup/cpuset: Add new cpuset partition type & empty effecitve cpus Content-Language: en-US To: Felix Moessbauer Cc: akpm@linux-foundation.org, cgroups@vger.kernel.org, corbet@lwn.net, frederic@kernel.org, guro@fb.com, hannes@cmpxchg.org, juri.lelli@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, lizefan.x@bytedance.com, mkoutny@suse.com, mtosatti@redhat.com, pauld@redhat.com, peterz@infradead.org, shuah@kernel.org, tj@kernel.org, jan.kiszka@siemens.com, henning.schild@siemens.com References: <20211018143619.205065-1-longman@redhat.com> <20211110111357.17617-1-felix.moessbauer@siemens.com> From: Waiman Long In-Reply-To: <20211110111357.17617-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/21 06:13, Felix Moessbauer wrote: > Hi Weiman, > >> v8: >> - Reorganize the patch series and rationalize the features and >> constraints of a partition. >> - Update patch descriptions and documentation accordingly. >> >> v7: >> - Simplify the documentation patch (patch 5) as suggested by Tejun. >> - Fix a typo in patch 2 and improper commit log in patch 3. >> >> v6: >> - Remove duplicated tmpmask from update_prstate() which should fix the >> frame size too large problem reported by kernel test robot. >> >> This patchset makes four enhancements to the cpuset v2 code. >> >> Patch 1: Enable partition with no task to have empty cpuset.cpus.effective. >> >> Patch 2: Refining the features and constraints of a cpuset partition >> clarifying what changes are allowed. >> >> Patch 3: Add a new partition state "isolated" to create a partition >> root without load balancing. This is for handling intermitten workloads >> that have a strict low latency requirement. > > I just tested this patch-series and can confirm that it works on 5.15.0-rc7-rt15 (PREEMT_RT). > > However, I was not able to see any latency improvements when using > cpuset.cpus.partition=isolated. > The test was performed with jitterdebugger on CPUs 1-3 and the following cmdline: > rcu_nocbs=1-4 nohz_full=1-4 irqaffinity=0,5-6,11 intel_pstate=disable > On the other cpus, stress-ng was executed to generate load. > > Just some more general notes: > > Even with this new "isolated" type, it is still very tricky to get a similar > behavior as with isolcpus (as long as I don't miss something here): > > Consider an RT application that consists of a non-rt thread that should be floating > and a rt-thread that should be placed in the isolated domain. > This requires cgroup.type=threaded on both cgroups and changes to the application > (threads have to be born in non-rt group and moved to rt-group). > > Theoretically, this could be done externally, but in case the application sets the > affinity mask manually, you run into a timing issue (setting affinities to CPUs > outside the current cpuset.cpus results in EINVAL). I believe the "isolated" type will have more benefit on non PREEMPT_RT kernel. Anyway, having the "isolated" type is just the first step. It should be equivalent to "isolcpus=domain". There are other patches floating that attempt to move some of the isolcpus=nohz features into cpuset as well. It is not there yet, but we should be able to have better dynamic cpu isolation down the road. Cheers, Longman