Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp560064pxh; Wed, 10 Nov 2021 06:04:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJytrSc2izUuLROcAo4jX/9rapc6RQBABmOwpotWfm0cKCYMSYsbrS6mlIAWuhgBnf57c/jM X-Received: by 2002:a17:902:b682:b0:143:7eb8:222 with SMTP id c2-20020a170902b68200b001437eb80222mr6657063pls.31.1636553081593; Wed, 10 Nov 2021 06:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636553081; cv=none; d=google.com; s=arc-20160816; b=TokwRvb2YwpO9wOYrJp9WAz7/C2YostFgu4aNj1MVvbRfbnvO9du/a67df9facwbWY oOH1FB2KuY/l9aCewmxC9kysl+ZyQ/1d7RB/sEiLPXRh2QJnpUTHHZW0P5LFHnez9Q97 XGrmr0ZHV4LaU1sLKSDPUbIeJm2DgAwasB1MT5iVP2Sgg9X5C6x3FlCtScNzqF8YPBmm Qx9g1UOr90yMUXUx14aGEyVdeefNEmS7ZEaFm58iTALaUSuB78Vqta4j5mctHTjU6qd/ H58geTBj5hbwY0Vl8eHXDg6DfS/SKKXcCmUChYgTYK/4SvD6z7+jHCBwXvfCxrqJNBWh ukTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1TPGlDsYndtj+OjEFiCGDmUdaoybdwvNgP/PovWuwWE=; b=SetSf1haPkY+ldGdioai2Q+GkZKmX/OZZucR4Js3SDpOcodklq6k5YHfqvBu6GvAp4 rzuG1LZMpeTpNe35Tt6bfxIk2kadpcm5YQ5No1puevD5bbtGBZfZy77z7ewzKZmXnTDu yucCOvkqscrH57WHfINZFIe0e1eDzDg/4YMNjF98XCYu8jcS/TyYJVPxWP2+dJFrr6AJ yyykdLLpArR+YhzQ9C9aK+qZ/XmsUxNRNQwg+CV/hMFv5888XRunUuqCIhn8lAug+xuC ajfLVKw3L05lpft54Sx+LMQNG1GpvBK+9qaYD901njS01X7iHBn75qknFqexUWkD3qpY SDPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MHZgZwkW; 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 c9si8684941plh.128.2021.11.10.06.04.25; Wed, 10 Nov 2021 06:04:41 -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=MHZgZwkW; 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 S231770AbhKJOFR (ORCPT + 99 others); Wed, 10 Nov 2021 09:05:17 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25555 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbhKJOFQ (ORCPT ); Wed, 10 Nov 2021 09:05:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636552948; 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: in-reply-to:in-reply-to:references:references; bh=1TPGlDsYndtj+OjEFiCGDmUdaoybdwvNgP/PovWuwWE=; b=MHZgZwkWeh4E4anL87Igt7l2bnzaS0PrVPKIh6pR7QAiYDySqAJQBi75QZouRMN7raPQIC SH2P5N7oA8aSB5sIOu4Z6tFqKcg4IPa7xs/MHkUWG4II2luPbrx/s1QiQfn3SImgHdzftd YQjZNpo+qKel8muON9JoD7z2n1Z62Tg= 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-495-MM8c5JeAMRmm1GLTfZmcJQ-1; Wed, 10 Nov 2021 09:02:24 -0500 X-MC-Unique: MM8c5JeAMRmm1GLTfZmcJQ-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 18BFE871807; Wed, 10 Nov 2021 14:02:22 +0000 (UTC) Received: from fuller.cnet (ovpn-112-5.gru2.redhat.com [10.97.112.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 437915D6B1; Wed, 10 Nov 2021 14:01:58 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id A1A32416952E; Wed, 10 Nov 2021 10:21:59 -0300 (-03) Date: Wed, 10 Nov 2021 10:21:59 -0300 From: Marcelo Tosatti To: Felix Moessbauer Cc: longman@redhat.com, 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, pauld@redhat.com, peterz@infradead.org, shuah@kernel.org, tj@kernel.org, jan.kiszka@siemens.com, henning.schild@siemens.com Subject: Re: [PATCH v8 0/6] cgroup/cpuset: Add new cpuset partition type & empty effecitve cpus Message-ID: <20211110132159.GA12767@fuller.cnet> References: <20211018143619.205065-1-longman@redhat.com> <20211110111357.17617-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211110111357.17617-1-felix.moessbauer@siemens.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 10, 2021 at 12:13:57PM +0100, 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. enum hk_flags { HK_FLAG_TIMER = 1, HK_FLAG_RCU = (1 << 1), HK_FLAG_MISC = (1 << 2), HK_FLAG_SCHED = (1 << 3), HK_FLAG_TICK = (1 << 4), HK_FLAG_DOMAIN = (1 << 5), HK_FLAG_WQ = (1 << 6), HK_FLAG_MANAGED_IRQ = (1 << 7), HK_FLAG_KTHREAD = (1 << 8), }; static int __init housekeeping_nohz_full_setup(char *str) { unsigned int flags; flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC | HK_FLAG_KTHREAD; return housekeeping_setup(str, flags); } __setup("nohz_full=", housekeeping_nohz_full_setup); So HK_FLAG_SCHED and HK_FLAG_MANAGED_IRQ are unset in your configuration. Perhaps they are affecting your latency numbers? This tool might be handy to see what is the reason for the latency source: https://github.com/xzpeter/rt-trace-bpf ./rt-trace-bcc.py -c isolated-cpu > 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). > > Best regards, > Felix Moessbauer > Siemens AG > > > Patch 4: Enable the "cpuset.cpus.partition" file to show the reason > > that causes invalid partition like "root invalid (No cpu available > > due to hotplug)". > > > > Patch 5 updates the cgroup-v2.rst file accordingly. Patch 6 adds a new > > cpuset test to test the new cpuset partition code. > >