Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp282118rdh; Thu, 26 Oct 2023 01:55:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7rKBFz8tbQQFOov8rQI/k+Z+ZRp1eId8N5lxn3SN7WdzebtteLXLhEKocMY7u/C4aEpC5 X-Received: by 2002:a05:690c:101:b0:5a8:22b5:399c with SMTP id bd1-20020a05690c010100b005a822b5399cmr20131031ywb.24.1698310521714; Thu, 26 Oct 2023 01:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698310521; cv=none; d=google.com; s=arc-20160816; b=nyl3j6NpTxGYSK3Boho0Ku63fapxLwJ+f9rIvoGfjX+1tflFdI6VJ2S8JZfh6s4MGt sqFJy8PGtWom2uw/0s2RBtg1K/rfAkOCHxmC0z5wbxAd1fni9MOXQSb3XuGG4+3Xmw+i daYy6O+0bcsCqneUZb26ouZ7NRoxBLLePlod49iFRLUGX01aVGVrS3uD2fZeSCkN6L6C MvcCOCg8asOUmIw9+79yFjAUkIDZklzVbNuGWxkwb8U2rrfFBPkNAqv0BDJtn3uHZg0G Vr4hA0bXD/gwk/w3bTCUsRK+Mabu/UwaVjTzjevyor86ZxyREjKPfz6XYXL17F2DdZ8X TFkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZEBcz5oDJwulfgGWI6eBUOuuP2Vu4P0o4e5NZllAitM=; fh=J6POzoldXcX5k9fYU/3AjETXOEtLojasA0qTUOP+TFI=; b=nph2OCDYlekwmTvDCyPAk/7onfjPR4/1HYuEHw2DMnVhTcPx3CMwNstZ9B4ng7NvvG NoG7B85nX2kodmknA+BuhxZIY2Nl4Q0or44FSeJb2n6bZ/zgpyWfjy+znjpwapg9Bfk7 eanAsnXmodNlTWzHfmYOCdqRVHgSYk/QWU1RQzJlsEw54rFONGoqZnpSBKoByGkujlcJ r+q8BqGY/pLgy7nZzTVmAOQFl84wiu4uAF0rv3HgdoySgr/IZ2H4Up9TiZ8Ngq+F2UoK sToHz4PWvYwTie2IitIiJR/m4+aoVdt1A505H/uAWRDmaxtKbf3LuL5unPEx59BM4O98 AyIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=PwTKzgqv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id p125-20020a0dff83000000b005a7a6a42f8fsi14462925ywf.269.2023.10.26.01.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 01:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=PwTKzgqv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 1907E82289AC; Thu, 26 Oct 2023 01:55:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344734AbjJZIzJ (ORCPT + 99 others); Thu, 26 Oct 2023 04:55:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjJZIy7 (ORCPT ); Thu, 26 Oct 2023 04:54:59 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CD3D19D for ; Thu, 26 Oct 2023 01:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZEBcz5oDJwulfgGWI6eBUOuuP2Vu4P0o4e5NZllAitM=; b=PwTKzgqvwdV9vqkNhbYrKz+zek Kon6ciA7lLWc3CH3oFeB3yz7K1FCn6sywGmYEw/yBrczmsPFg1BranwwmAr/W69KAcF5cdCQeoZPF NpNvU7gh9IyC359JYttetQBwZkEuIvfOwf33jiJogBpRKTVgbcKB/Hl6zy9nPlTWOiYBpScpWXhhX /pe8fHGSrwAT/i2ZNzXibH1JGhHivrNhyzcXsgolpORCmMUCrd5vAJHpgdpNx3DdG/c3ESzKBTtZ4 UoM3/JDu4XuhdJWnf2m8HjIoLhyHb+j/u8MoEIm+lnF9CVaW/LP2juXic+rGYxDZsjMgT33DNFwLO V/q8AstA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qvw86-00H9u7-2g; Thu, 26 Oct 2023 08:54:15 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 7949D300473; Thu, 26 Oct 2023 10:54:14 +0200 (CEST) Date: Thu, 26 Oct 2023 10:54:14 +0200 From: Peter Zijlstra To: Steven Rostedt 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231025131731.48461873@gandalf.local.home> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 01:55:18 -0700 (PDT) On Wed, Oct 25, 2023 at 01:17:31PM -0400, Steven Rostedt wrote: > On Wed, 25 Oct 2023 18:24:35 +0200 > Mateusz Guzik wrote: > > > On Wed, Oct 25, 2023 at 11:42:34AM -0400, Mathieu Desnoyers wrote: > > > On 2023-10-25 10:31, Steven Rostedt wrote: > > > > On Wed, 25 Oct 2023 15:55:45 +0200 > > > > Peter Zijlstra wrote: > > > > > > [...] > > > > > > After digging lore for context, here are some thoughts about the actual > > > proposal: AFAIU the intent here is to boost the scheduling slice for a > > > userspace thread running with a mutex held so it can complete faster, > > > and therefore reduce contention. > > > > > > I suspect this is not completely unrelated to priority inheritance > > > futexes, except that one goal stated by Steven is to increase the > > > owner slice without requiring to call a system call on the fast-path. > > 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.