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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22AE4C4167B for ; Mon, 30 Oct 2023 18:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbjJ3SEy (ORCPT ); Mon, 30 Oct 2023 14:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjJ3SEw (ORCPT ); Mon, 30 Oct 2023 14:04:52 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D2D9E for ; Mon, 30 Oct 2023 11:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1698689086; bh=ydHT5HXh6Ag6yIfOyy0n3n6NmVWPONL5Lz07QfKKJII=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Hxh0JUIMlf04sqOC8ePwr5m+Ol3cmuHirj4HrbrIvVG5lDpeG+tDbJu8iXD3zoj37 4ZEDsHL+2BiZdLi/LNI4xHzysZ4Qpd7qWDAw59xu8OIj7E3dmerfq54D3YWdDrDwlN wMawV6LAnr+sqwTW2XJdWm2MYBV7ZwOcmQ4IcR9tJF6rXbr98CNIfmDnonMq75YBt8 IcgWCcOZs0bEgqQtCgPc2NrpiQ1xj7W43al6zgFasllh2jU6//KcxzQwOWIpPl5J7I cIhXz6Rgw6T0VILrpjMJDER3ilGaDnw8pUE+ojWj1mLurmSi7wV6kR6wen0phKNTw2 wN/Vl8XY2kwoA== Received: from [IPV6:2606:6d00:100:4000:2d85:44b8:ccb0:e487] (unknown [IPv6:2606:6d00:100:4000:2d85:44b8:ccb0:e487]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SK1Pp2Wmvz1ZQN; Mon, 30 Oct 2023 14:04:46 -0400 (EDT) Message-ID: Date: Mon, 30 Oct 2023 14:05:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice Content-Language: en-US To: Steven Rostedt Cc: Linus Torvalds , Peter Zijlstra , LKML , Thomas Gleixner , Ankur Arora , 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 References: <20231025235413.597287e1@gandalf.local.home> <20231026105944.GJ33965@noisy.programming.kicks-ass.net> <20231026071413.4ed47b0e@gandalf.local.home> <7871472b-a0c4-4475-9671-69a3244f956d@efficios.com> <20231026164549.14d45c60@gandalf.local.home> <644da047-2f7a-4d55-a339-f2dc28d2c852@efficios.com> <20231027122442.5c76dd62@gandalf.local.home> <20231027124930.3753cdd4@gandalf.local.home> <20231030094508.031357b4@gandalf.local.home> From: Mathieu Desnoyers In-Reply-To: <20231030094508.031357b4@gandalf.local.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-10-30 09:45, Steven Rostedt wrote: > On Mon, 30 Oct 2023 08:56:50 -0400 > Mathieu Desnoyers wrote: >> >> This only works if "your" lock implementation is the only user of this >> RSEQ feature within a process. RSEQ requires that multiple libraries can >> share the facilities. Therefore, the rseq field should include the >> nesting counter as part of the RSEQ ABI so various userspace libraries >> can use it collaboratively. >> > > Then I would suggest allowing bit 31 be an "on/off" switch, and the lower > bits to be a counter. When I first tried this with postgres, there was one > lwlock that looked to be held for the majority of the run, so I got rid of > the nesting. But I think a mixture of both would work, where you can have a > nesting counter and an on/off switch with the caveat that if you use it and > enable it, another library may disable it. If you have the nesting counter, why do you need the explicit on/off switch ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com