From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1907DC25B6B for ; Thu, 26 Oct 2023 13:40:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 691218D0027; Thu, 26 Oct 2023 09:40:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61A048D0001; Thu, 26 Oct 2023 09:40:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E19B8D0027; Thu, 26 Oct 2023 09:40:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3D8F48D0001 for ; Thu, 26 Oct 2023 09:40:47 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0F26B1401F1 for ; Thu, 26 Oct 2023 13:40:47 +0000 (UTC) X-FDA: 81387722934.30.84E8CBB Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 319284002E for ; Thu, 26 Oct 2023 13:40:43 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf11.hostedemail.com: domain of "SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698327644; h=from:from:sender: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=WnD4SPQAk6SFC/k2ueJNQSIVbruitiEKVOfwn/S53Nw=; b=VkssKB9tCwKapluF12lUXT20Og61Rk5AP2xxAMX8lYp1DXfsTyfVSZor4bbXQ7Ht60/SjJ U30+szZ4eLLrrju9YMPP/27mN4j+AqgIozNd3YSoH6iTaGOCZU6Q3KacbgyCnn5ZI2IB3p WBQzFjFlRGyGm5ovcebSOA3zMKClxX0= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf11.hostedemail.com: domain of "SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698327644; a=rsa-sha256; cv=none; b=FmM3RPDFsO20TRVN6qLvcWif3cq84P6G6Bv4H1d3WLzE9z5UbJprX2ecvCS09Z4jE6Z5Xb cEceQnOYdbUjwgKc224Uy/f6Vi1+/dDCCexWm6204o8u20o+srB6g2hgQk9pTMN3TeRPJR RJeQ0eP0GF2ofHXg4/imUasgOy2JfHQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 66926B835DE; Thu, 26 Oct 2023 13:40:42 +0000 (UTC) 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-Rspamd-Queue-Id: 319284002E X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 51jjctjjkdk8o1suus1irzgjgqijkk3z X-HE-Tag: 1698327643-485808 X-HE-Meta: U2FsdGVkX19LBrYzlvVWSLFvNL/drSG35Sruhx1muc8JL0EEI0q0nde3nfvjDVPk66x1lESGKE1gzZeYo2xBYBkf8d2+yCybqqbVWJQGlql6s6PcChzkEOvkTMgYYB+Zh8VSYo0IbrA3PInrqZpAOFNay/t6NNbZlPOzEV9t/jktF911ia41HmT/ZewWAnglquw0xcy2B5uBtp/Bnj8avn/peAxSrrqJsYQr+P0D177cWNygxTy8Vn/MBY1MMuqDTeUi+MUXpC6l9PG+qdJ8fCJHwAcQFQ7OPBqT1WifqHeig/L8XiWzRCw3mxop6wf7DXARBA5d5zYAR/2Cr/jVOs7iwT6swfEwhquB7JgD5NFQVQ+4RRhrsrjLUc9Z3Ie2wNHA7ef+52wxQrjupkHifpShdANuHGL2X7KzkKNZX8KJ9rvRBUQIrtb/El5UWlraBlkpXv8Dzt7p3475QDN/qWYP4v3RP7nmCLlLC58b+vPvnQ+8MMVb9nfGgy86d+1Z8nARdDjSkK2OD6bKsUPL2J44wjBOXpLhYmeYasuYOSKdyTEWJ8YfeObhm01z4K29a+sDNgM3zo5d46G+VNo+MOLzmg4XAE9Qg2SJolEMwunsj+PBIbRA8lDi4P/76VJ4/sfWTKzfQPSA/oPWVNvrwba+IT10vCE+K2ptP5QdOs9W1EK8GjXxNxncDLIYPO7FkIsyuUzrnvxnIgVDBX3M2S6ZcGQ8M8BevAKqaGlemPmeG4lRsLVdv7ELZnFPULDsakPkc08wOS4dvLEnnu7o2Jx/gLH727XaWs0hxViWrDzauLQ7YXZBbHBO45Z+8HWqwp4Khjb++XRJ3803iiqCtDVCZU3uPd1V2fPY8BPPqmwX2pY7L56hlFoH1CujU3OjdDZgIgSIE3sgM4IiHJn2czF3hvKmyaP3t2sRhqsRFneAuAJoI8aJp5adlSl31RzcgyUXfrdXEK9Qo8g7fo6 s4PlJNVY ZULkx89Vrvqu2Ly1RXqROWVRuR5JRgJdH7fPyui0P5Ynr7fkYl/6LHzQvHEjNZJPA8UQQGieOG45BG/3zX4Ba7IHzjAkOHqPhaslTkNTyGZUbXkGWz5ZzqJbuuMwl3Y/pZVcCBd3ra6c1iZEd4RNAq+1jlqKEQrGfH4KhtW5XJoSb8o8ydy1GzD7N0K33pTjaIGAOP1FchVFm+N0mw49kU7tXkZvrJCw28AXqICV63ESFTUYpSstAwpVolyGRXXuCY8T/zsOhTdUI9WuWLvzClKejcPSa7N1kOuQVQ1L0QlosJ0MikwCdyZ04kQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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