Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2929052rdh; Mon, 30 Oct 2023 11:39:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEndJfIOk4fjQKuQpQrn5A0F1sbGujOX6vrMiKwGvtJsEa/JyeRvB2vJ5O0+C9PkEadXgLe X-Received: by 2002:a05:6a00:2302:b0:68b:e710:ee9c with SMTP id h2-20020a056a00230200b0068be710ee9cmr8551699pfh.19.1698691163669; Mon, 30 Oct 2023 11:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698691163; cv=none; d=google.com; s=arc-20160816; b=EG7rNWssICbyNKWDqN2IcItg38AW94gdxqWAb4cEv/YsKCNBybM/lBxnCvkdUKn6T1 NYPqDMkpe5vkZ0i9P2M3S62V0NTL++E2uNrh5bkZ66MEBRdkVoSmfCSRdTguAq9sJ30Z ARML1puh6+hT0pRVgp24KsvwUwZzda9NUSAPFFlBIoPB9ZfkIP7ZBPUOWR4ZMc2yDEPj kitVYQG7vsUSZEXTXfKPBGhrZrQh0oK0F+nmWbkOsu4rqvAESX/bfvqP9aT6JFmLtD5u +OFqHQa9cX7oPseEAfG/P5FHLxx+bmRNyiwYpAq7vQ0cDtYqBx1IA0zcTGbRY5BrUMBJ Nh0A== 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=cJjvyES9E8oIPzlETnBBtpACNr98f7urydAMQ6fMhj4=; fh=SfvE4YKxHarc+4mYRLQvWrf/g5l7JvlvohgguvJ6moM=; b=RIP+JE+4T4eJ2XL4FiAOQpfXdOGTea4N4p6VhFcoLQnqT4zYVYKXf2yiZG4vGLDDBV Z8ubfl++NTMDeK5RHbMMhSoXOdESIUw1m35i9zQhjHYjzgwVse4xmMUJ332IYudFsE1W 2H0xcRJ8Hlt21AH2aBXWXGjzCXIGRQg0s9AFMcoxyStffUMExhQMI+6tUeQ9/H9Dj1t6 NbtDoLH9NHazctaEAlBqCuJsixDgxhEKYIRwvMceuFthYmbk1yHGN5bFK7BuEpJmAIr4 Q0vZFzCsChQizI9y1cnL4GZ6JFahSl8+sm/efDXWwsSvqC0rRn3PjbG/iBEvjLhOjEOx otKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ka21-20020a056a00939500b006be3a6e8bc6si5389480pfb.283.2023.10.30.11.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 11:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id E0B46807828D; Mon, 30 Oct 2023 11:39:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbjJ3SjN (ORCPT + 99 others); Mon, 30 Oct 2023 14:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbjJ3SjL (ORCPT ); Mon, 30 Oct 2023 14:39:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C82E8DD for ; Mon, 30 Oct 2023 11:39:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F8C9C433C7; Mon, 30 Oct 2023 18:39:06 +0000 (UTC) Date: Mon, 30 Oct 2023 14:39:04 -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: <20231030143904.5db873b9@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> <20231030094508.031357b4@gandalf.local.home> <20231030141956.05661b90@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-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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 30 Oct 2023 11:39:21 -0700 (PDT) On Mon, 30 Oct 2023 14:27:10 -0400 Mathieu Desnoyers wrote: > > So I just made every unlock disable the extended time slot. I need to go > > back and enable both a counter and an on/off as I now realize that the spin > > locks (called within the lwlock) will disable the extend time before the > > lwlock is released. This should work if I have the spinlocks inc and dec > > (they are straight forward and all locks are associated with an easily > > found unlock), and have the lwlock use bit 31 as an on/off switch. > > This extra on/off switch appears to be working around userspace issues. Yep! But that doesn't mean there's not a legitimate use case for it. I don't want to limit the feature for that. It's unlikely bit 31 would ever be hit by a counter anyway, for which it could be used as an on/off switch the same way the NEED_RESCHED bit is used as an on/off switch for preempt_count in the kernel. > > > Anyway, I would let user space decide what it wants to do, and giving it 31 > > bits to say "I'm extended" and let user space come up with how it handles > > those 31 bits. > > If this makes it into the RSEQ uapi, RSEQ should state how userspace > should collaborate wrt those bits (e.g. nesting counter protocol), even > though it's not a kernel ABI per se. Otherwise we'll just push this to > libc to specify this, which is odd. I agree that user space should have the usage specified. Hell, that bit could just be used for testing purposes. I think having it reserved is a good thing than not specifying it and limiting its usage later. -- Steve