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 27FE4C4167D for ; Mon, 30 Oct 2023 13:45:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3F036B01F2; Mon, 30 Oct 2023 09:45:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AEF206B01FE; Mon, 30 Oct 2023 09:45:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DE166B01FF; Mon, 30 Oct 2023 09:45:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8C6626B01F2 for ; Mon, 30 Oct 2023 09:45:19 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6B2281CB300 for ; Mon, 30 Oct 2023 13:45:19 +0000 (UTC) X-FDA: 81402249558.02.986DC47 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf19.hostedemail.com (Postfix) with ESMTP id 6ED2E1A0006 for ; Mon, 30 Oct 2023 13:45:16 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=hW9q=GM=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=hW9q=GM=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698673516; 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=l1xIeIV9sjc+tbLMOPDmfrCKT7qfHLthEuU0xXp9Xw4=; b=BBBesAMeyELtjmF8xgmVB+PSwNtZAFMpH+M7HmMi7cm44VkQFZWsakkBKNBTMuQfoTDY/2 opQQNbZcA3roPhRbDjC2v/yqIuBPZ0/69YG8XYiDVURuFerc7MO1DMgwxv6cK/yrS/iTmF MqeGRH3JlMzfl4/z1HLTF5xDonGKxyE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=hW9q=GM=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=hW9q=GM=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698673516; a=rsa-sha256; cv=none; b=u1WObmlls52aZFUGA5DTs70qzg+icItqemQJ2w24iVmezY6MGTDcSk7V7/aMsANyBs7Q8j AflY5Tr1QIIMNoxTrQSUaRmnAwHfxr8x0I/CNTuqDXVQxF0aInrPWwwhDEl298mgf0Ojoi KQKMQNtT0ecT664MREoNR0QwWBO0OvU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 6C98EB809D2; Mon, 30 Oct 2023 13:45:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB069C433C8; Mon, 30 Oct 2023 13:45:10 +0000 (UTC) Date: Mon, 30 Oct 2023 09:45:08 -0400 From: Steven Rostedt To: Mathieu Desnoyers 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 Subject: Re: [POC][RFC][PATCH v2] sched: Extended Scheduler Time Slice Message-ID: <20231030094508.031357b4@gandalf.local.home> In-Reply-To: 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> 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-Server: rspam09 X-Rspamd-Queue-Id: 6ED2E1A0006 X-Stat-Signature: k8wk1zdmfhy8bxzbp8xfr7nzxur99e5k X-Rspam-User: X-HE-Tag: 1698673516-360446 X-HE-Meta: U2FsdGVkX1/obWk5LYx4PlvCwyciZsTjHNyPbtdurrg1Kz6xd0Sl/4DvRT29/TEEjGZAFGNgDazO/xg0A4FFVHVQgFAxOq/Pi7iy4h1faf61UMGE7CBgR30iw7ekHUhWxD46eVPPpMcXSv9nk0FzXAjXZe4wDpU8VlQFndWZ9qZMKzPnI52FNL9Walxn/ZfCweSE4cBa/AK7KgdN2ha760HFvsvSJa1u2Zw0nQtrgHB/zVVwPO6hFRkkGoU4VbCwYsPVFLJBqUGA2fJoPmSFGuqmCHZ+IVb3WOoHFmDhoIR7iO32Gu4QAqlEsfNAr90zORzVCPB6Ag/S7GonRTcZ9C5acIONf4Dk+bVCV3vzW4It+QzWmsyexXdJSAaTlgjIIwVC8mIfYv6C0xXjiHd3WCkjfrXa+5h2dGaZ7NScAYsfFPyuR7sy6HAgIg1sfkJq5MrFWR9maitC+B+ARclE4u+YSMcpIK9ONgDUjBfjUYJybe7KCWOlX+dVppZp6YIlgFhIU4y11WRPwHH++5iSZuhW5zYJdqA13dmthykj8S+Z4Fo5fb3Pv+qcWLY/uJqzPP8Iq6fjncvo97rBQOyCMJAWXgHbnvc9TW6JYt/MD53QS/0na3Sr+C993zUvc3rd9sFlrzgzmYJV4EGjeQuAX2sImcir+ztpbQY2Bd7neOS70AJq+CRH3Waa00fR80knHYHtX3bggu1EgGyRTx6Ah4ANgLO/iJ9u0o9Guq4fUSOebP28zcpl2vuEGKidEYF8+UuG3NXEGL5rMK8eYCtXjtPyOwpNxBK2BG9DC2bcv3A4JlDenJj1t27rfL+a9GmWz62BTB0clDzbCzMAsCxb0C8ZIP5d7Kjwsj2SauO9+rctuVppISoQttBR/1re2QoIVd5eqrp2Vb0KMYfqj0zNV29nScNuWwbbwtgqB/uWfsinvVe5po2XOgiJ/Bt6TkDV6cbtuKNzABVOHzEQOQj qjnRXLwT sfBSs2EfgZENm7VEQ+7r4oBN4L+C5t57JG8vbjkyRSECh9gJG4kVY+j6Md9Y9GO8KnJ8l4+TwUEGxIOLTj9qhiW4+dxw1j7NkEdabq1y5SfeyV+PGgHVMxIoz735nVSturUFswA/IqCSfyOE5fSvIGLNYrc0y/5ODHWvQJmOjzk3Ksr4aQMbZFDmzjXoJmXjzbt/foVMKoacpX5TrR4KBQ3EF3ZRu1SMUnNtk3UPhKfROieXO/E3DSsXPbGbENHKGyt/vOpGaGaW1IPnZL7/gOlmiez3jELYYVO1GfW3EjbfUeP/ZvwDBEAYGYg== 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 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. -- Steve