From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC4FA3BE64B for ; Mon, 11 May 2026 09:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778491797; cv=none; b=gXjbngVls5oEMlkOvFqB3ibVcp2goKXywjFrOmJQ8MC6xswV8pnVCyuWC487i/ReRbtjZVDCnBqz+y5mLgaNpGcLxFyhaPSddZh1IOri0WU+gHM35hove2eyS3CQW3FB1PsSeIG85vTc7Nz30Ghpd8buVVrwsyyaxItXmqp2EDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778491797; c=relaxed/simple; bh=p0ukpXDdMIjahg/dwyxcpgBlHpQ/LJiiE2hUUZVLoR8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oIZCur/zHYqjPKSHieNvmeV9ulsMjIdGi9139XpLM7Cj1twho/P0wzkmADVrmifVEsmT0Jt3C3yfBRRArPUxAzkoHed8c8b4k7RHSGHK8cbpYcUH6eIVSiNE7exT5fcgD51l0FR0zdlgvj2V2fldCljsRgm+QHAKY3zkhzaFHcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FxI//E9N; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=EBjZmITb; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FxI//E9N"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="EBjZmITb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778491794; 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=yL+az9BIHTnebA7bZqfjZuHBOfbE8wVkbiZ0XEwVSBQ=; b=FxI//E9NSza+COis7ukol6TNZIbenCJQPiQIyIGSHz9iGtnJ/mBJGuj18UEJWHlr/d23w5 Q9GQKu3MepZd99aLPr757Eq9Xgs2yhS0/CUplDBNP7qRQAeqxqVQ7oQWR1Y5Qf1YQ+egic pEK3zPLB470rGRF2m0f3PWf8+LfKg64= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-517-GEyu3Hw7O8usp6lZJB1zxQ-1; Mon, 11 May 2026 05:29:52 -0400 X-MC-Unique: GEyu3Hw7O8usp6lZJB1zxQ-1 X-Mimecast-MFC-AGG-ID: GEyu3Hw7O8usp6lZJB1zxQ_1778491791 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-48d1b294dfeso38256995e9.0 for ; Mon, 11 May 2026 02:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778491791; x=1779096591; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yL+az9BIHTnebA7bZqfjZuHBOfbE8wVkbiZ0XEwVSBQ=; b=EBjZmITbClwUT4OpPA3bxHg+wAtjdouVE1hdsEBy2WyopZPc+WG+2FUoyVTRZrEKgP UWxaQH6aAw64nYFVnUQx26Q44DpeB04U+DNgkqH7JM14Qk/MFFzAZJAnUsfFAlnN1xk3 y94PSpg1GTgtyGaKhYdN3Dzgk7ppNWWNn3yhE9uHlOI7DldZFpB2LiCBkLEGIn53tEd1 kNSl0Ata5cibtoX0egA7dlRffqjv228te7loM1A8/oz15x1FSjeYoqOvekNcJAQ6oHYX g92L5SI5eLA6zBlqSJQnzwfF4uBwBR/bQm/1w5REZYUpcbdBJxpJoN9sKbjkhAxJ3V/O kDNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778491791; x=1779096591; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yL+az9BIHTnebA7bZqfjZuHBOfbE8wVkbiZ0XEwVSBQ=; b=MufGat4B6gNbQI4W/Ssek9k1MmFOIwcdhWf2tlF/IIQpzPo8WhA0lTQWhUA6BtlfiT 8lluflFb2cOv7+DGMKBwEY7YYlbD4KPgBsWfZffrEX7lA7cXZtI9iOnNYME8Y8WKz81W QBAInHVN/QFg0oN79ygYFJ20iBuomMJNZqgU8wc2szGCrRWwOZ1bQneGTs6YTnNMNZQi MFkYSJGfCQk0vnjtGofV/vApSlReTlB/6lIA3kU8Rv+YypETE03K9wrHuKTLk8FK3xPr pT1DTAmm2y9HVrTlVwI8x7BqCF9OMRu/ivM51z0m9Mg/EaNjx3VRikT6OVrnPRHJ9jxk fZtQ== X-Forwarded-Encrypted: i=1; AFNElJ9Ruxm73zs+XY6YnmZ1P7XyJfDk9RmuFBy+acgeYXNsLa3IJqBvtE9gREGF/Inn/VyQmD/dThTn2kfyHnw=@vger.kernel.org X-Gm-Message-State: AOJu0YwaQEbOPJgl8VWVM2D2MFUmqOHMYRZ/uoaOazLmP0I4fjovbjB9 NM1/MJYTT538iNWC9BM0DNJQTg1YHhvF2vfjufoYTXh8CxOjdh31bD2BPWYVKg1c8G57GlM3RL0 Bj1icxlTw5pxPNL82lo4puLVVmpdClTbzYdiwERnb0s44g0S6bIKIMU2LoT1ce7QSng== X-Gm-Gg: Acq92OHmRM1Ns1OFvxZYrfmMpkff71QcAbrxmO2loGTVq5Iil/1wCsXNdkWmtxfb+yD BPfpfr5bcuVRqGxK9S84eHT9OYgittymFa4W/ZY6MFQgjqGo1Cjc0DzaD6vvOmpExkCjJxVacFK w1KJYdg9w6AA93/4+BiRYZWGBnQ2QF6Q8Tz9c7BoiULkgYXtPTtcibStowkw7R1gVxyOVt5AHy7 f4El+n7VdgjAHE1nNLpXx9wBxIVnq/iLesfZT0wV/prUVZ/KBjQvfWVq/bBz0x8QAdeOlTfcV6x VDw07rZXAobOepZlid2TKVmHNjFKeyo1AffMXG6KkCV7utahrX96Ov3XlDnAvzsIi4atWv0G2tE 2JwwgHnmH8mIbHyy08jPZeYIDjiodTqWGdg7l9crl7sOYofztCJRv X-Received: by 2002:a05:600c:4591:b0:488:bc6a:528d with SMTP id 5b1f17b1804b1-48e707f81e6mr138978635e9.22.1778491791048; Mon, 11 May 2026 02:29:51 -0700 (PDT) X-Received: by 2002:a05:600c:4591:b0:488:bc6a:528d with SMTP id 5b1f17b1804b1-48e707f81e6mr138978155e9.22.1778491790616; Mon, 11 May 2026 02:29:50 -0700 (PDT) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.56.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e702e5630sm159657345e9.8.2026.05.11.02.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 02:29:49 -0700 (PDT) Date: Mon, 11 May 2026 11:29:47 +0200 From: Juri Lelli To: luca abeni Cc: Peter Zijlstra , Tejun Heo , Yuri Andriaccio , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org, Yuri Andriaccio , hannes@cmpxchg.org, mkoutny@suse.com, cgroups@vger.kernel.org Subject: Re: [RFC PATCH v5 20/29] sched/deadline: Allow deeper hierarchies of RT cgroups Message-ID: References: <20260430213835.62217-1-yurand2000@gmail.com> <20260430213835.62217-21-yurand2000@gmail.com> <20260505151523.GF3102624@noisy.programming.kicks-ass.net> <20260507105331.GQ1026330@noisy.programming.kicks-ass.net> <20260507183931.3915dc59@nowhere> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260507183931.3915dc59@nowhere> On 07/05/26 18:39, luca abeni wrote: > Hi, > > On Thu, 7 May 2026 17:03:41 +0200 > Juri Lelli wrote: > > > On 07/05/26 12:53, Peter Zijlstra wrote: > > > On Tue, May 05, 2026 at 09:56:58AM -1000, Tejun Heo wrote: > > > > ... > > > > > > - However, the cpu controller is a threaded controller which > > > > means that it can have threaded sub-hierarchy where the > > > > no-internal-process rule doesn't apply. This was created > > > > explicitly for cpu controller. The proposed change blocks it > > > > effectively forcing cpu controller into regular domain controller > > > > behavior subject to no-internal-process rule. Note these are > > > > enforced at controller granularity and this means that users who > > > > use the threaded mode will be forced to pick between the two. > > > > > > Right... this then means we need two controls, one to do > > > hierarchical bandwidth distribution, and one to assign bandwidth to > > > the internal group -- which is then subject to its own bandwidth > > > distribution constraint. > > > > > > This might be a little confusing, but there is no way around that > > > AFAICT. > > > > Just to check if I'm following, you are thinking something like below? > > > > groupA/ > > cpu.rt.max = "50 50 100" <- 0.5 from root > > cpu.rt.internal = "20 20 100" <- 0.2 from groupA for threads at > > this level > > + threadA < > > + threadB < > > +- group1/ > > cpu.rt.max = "30 30 100" <- 0.3 from groupA > > + threadC > > > > And we still keep it flat, so 2 dl-entities (per CPU), one handles > > threads at groupA level and the other threads inside group1? > > An alternative idea I was thinking about: we create 2 dl entities (one > for "groupA" and one for "group1"); we set cpu.rt.max for groupA, and > we subtract group1's utilization from it (so, if groupA's cpu.rt.max is > "50 100" and group1's cpu.rt.max is "30 100", groupA is served by a dl > entity (50-30,100)=(20,100) while group1 is served by a dl entity > (30,100)). > > Basically, with this idea the "internal" reservation is automatically > computed based on rt.max and on the children cgroups. A possible issue > is that if the children consume all the groupA's utilization the groupA > RT tasks remain with 0 runtime (and never execute). While I like the automatic approach, I also fear that it might be more difficult to maintain/use from a systemd admin perspective, e.g. I cannot make a subgroup reservation bigger because there are threads running in the parent group which consume all the remaining (internal) bandwidth. If we make it explicit it seems easier to see where bandwidth is allocated at all levels. Peter? Tejun? What do we want to do with this interface?