Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp445644rdh; Thu, 26 Oct 2023 06:42:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEakJCZKkipXEzP9MEE/4X9r9jTdfa5RiVxwPPlg3Ge1kGgHtqLfuWXoBGxp2+4MHa9gXFe X-Received: by 2002:a25:25cd:0:b0:da0:b396:a44d with SMTP id l196-20020a2525cd000000b00da0b396a44dmr1440590ybl.54.1698327739431; Thu, 26 Oct 2023 06:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698327739; cv=none; d=google.com; s=arc-20160816; b=fcl/Hbosw2UOLhOKsYehcaP9knQQOih+cu1fYfaq0cAE9NJsaeUsxdsEE/lQ+DWwB1 UPYUzp9krlQuMlKjk1fEtmpigNvapxyk31XFStiBkurf7xOGC7UxomuHnlaS56xPhPvF 35CrysMpAKxRG59UUrVihpVAB2lWeV8HPpMF2LzJzRbBhMwLk3fv6GgCieMuSnrOQ4yP E5mXPE9b3fzpMf1YJ1QXOAjUHmidJG9jBex++tBLaRhpnHM78seQYj1wpSFbXyb16AAu SfdnbO4U/yC3HxKH/LB/gQf/XQ9ixhDRAo4FIzmsB76dFnvEHgQqKvAmJ5qLYcMdK2KE 9TqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=WnD4SPQAk6SFC/k2ueJNQSIVbruitiEKVOfwn/S53Nw=; fh=2JIqL6sk0cDHzgRz49tRRAXsXC5FLN1vZ+WX5N9vGA8=; b=w/yfhD59ZgsCTndBgxWacdrHBaHZbXW/oEkUNtO1lTY098WJn5PsiSJYhq7TNmmxWn kfrVv2ZAHQf4MjqPLxE/f0sHo4DI03CMcp8OZu6i1dqA5mJmQ2S3s1BManI1Tn2Aic0W zFfuRFY3Ba4AnuW/Lv7LCc++wOGXCNoBoQ04lBDgsPE6wJCyncv5Ar7b7ol/AYmCBSbG +EcdZuqi2dWuNRjXVKdywJURul5Jn25ovL8bnT3N5usU2SmY3UUcMyqCpweM6UO6xxBR hKFJp4eupmo+OKN2tMnhcon1O15HOw6x+iXNRTerOWiaAbEIK/RFwT9piSIp+oHJIoDt knmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n194-20020a25d6cb000000b00d9ac41bbe9bsi13583980ybg.390.2023.10.26.06.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 12643809F3A4; Thu, 26 Oct 2023 06:41:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345098AbjJZNkq (ORCPT + 99 others); Thu, 26 Oct 2023 09:40:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbjJZNko (ORCPT ); Thu, 26 Oct 2023 09:40:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E62F1B6 for ; Thu, 26 Oct 2023 06:40:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E5FFC433C7; Thu, 26 Oct 2023 13:40:38 +0000 (UTC) Date: Thu, 26 Oct 2023 09:40:35 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Mateusz Guzik , Mathieu Desnoyers , LKML , Thomas Gleixner , Ankur Arora , Linus Torvalds , linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, Joel Fernandes , Youssef Esmat , Vineeth Pillai , Suleiman Souhlal , Ingo Molnar , Daniel Bristot de Oliveira Subject: Re: [POC][RFC][PATCH] sched: Extended Scheduler Time Slice Message-ID: <20231026094035.213e3744@gandalf.local.home> In-Reply-To: <20231026085414.GL31411@noisy.programming.kicks-ass.net> References: <20231025054219.1acaa3dd@gandalf.local.home> <20231025102952.GG37471@noisy.programming.kicks-ass.net> <20231025085434.35d5f9e0@gandalf.local.home> <20231025135545.GG31201@noisy.programming.kicks-ass.net> <20231025103105.5ec64b89@gandalf.local.home> <884e4603-4d29-41ae-8715-a070c43482c4@efficios.com> <20231025162435.ibhdktcshhzltr3r@f> <20231025131731.48461873@gandalf.local.home> <20231026085414.GL31411@noisy.programming.kicks-ass.net> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 26 Oct 2023 06:41:11 -0700 (PDT) On Thu, 26 Oct 2023 10:54:14 +0200 Peter Zijlstra wrote: > > No, I wouldn't say it's the same as priority inheritance, which is to help > > with determinism and not performance. PI adds overhead but removes > > unbounded latency. On average, a non PI mutex is faster than PI mutex, but > > can suffer from unbounded priority inversion. > > Matheusz is right though, what you're asking for is a (limited) priority > ceiling, which is a very primitive form of PI, which itself is a very > specific case of proxy execution :-) > > Note that in kernel spinners have this priority ceiling by means of > preempt_disable(). > > > For this code, I took off my RT hat, and put on my performance hat. > > Seems to me you took the brain along with the hat. > > You're confusing cost of implementation with concept. Yes full blown PI > is fairly expensive, but the concept is still valid. Priority ceilings > were always an approximation. It's a very weak priority ceiling, and why I didn't associate it, as I would with preempt_disable() in the kernel (and I have mentioned in several of my talks that preempt_disable() is a PI, as it makes the running task the highest priority task on the CPU). The major difference is that this is time sensitive. That is, the kernel gives it an arbitrary amount of time to finish up. Priority ceiling is usually associated to an entire critical section. Not the start of it and if you don't finish it in time we take away that ceiling. Even proxy execution doesn't work that way. Hence, why I don't want to associate this with priority inheritance. The time constraint is a fundamental difference. -- Steve