Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1291181rdh; Fri, 27 Oct 2023 09:44:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVgMegGes361Z09jiSti8gET+RfaQpGWUcDZ43NciqQmaz6aO8P69TJBHaK9NMtFNfJuQv X-Received: by 2002:a05:690c:dca:b0:5a7:c6bd:7ac0 with SMTP id db10-20020a05690c0dca00b005a7c6bd7ac0mr4461822ywb.13.1698425076371; Fri, 27 Oct 2023 09:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698425076; cv=none; d=google.com; s=arc-20160816; b=uXF1F56qF+FDmcQnfx/4B6UjG3j0VWtwK9skomAvAYkqTC/wzm5moUpA1cxqglchLt BfuWbCMbw9cv8zhSpF7jK4O9qtJYf4jQn0v/I+47/x+2jF2xnPPk8cDKm5BAMpS8Z2uO 3AycVZbdVnt2uIyxaCxfHUhNljkJBgm8v8bu0Mzvad7FEpGSs4QRA6vM2+hV9RLkSYNe 51awkB27B9YtWVgyvszBwS+F9Uv4DcpD5G/I4uPqS8BB7EGy+pkPUJUur5qvnKbnd89F JNqEJrAdya6DIFNBYmeDomUdqzYZ6Ben0oLiy/CcKehyOcDRNry/cys/SAUXcKJN1AvU qsNQ== 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=jaskXNKbj2o+ewL20+QdzbUbrgwqMBUs+HMIQYKGsnc=; fh=qs+3pj00Q72KxiZyDxdQrBEzGPfkm8t4CkCoocYEl8o=; b=1FY/t9h6c1omy2AIiVBfAylvabj9zjC6r5Rsl1zKbSncY6YbdukGvdgfgkpt7jrTdx Y131BYZsfvRUgjqq5SglAO21MJGXl+lB1y025Mw+X7nAt51VohBTy5MNqNjsh6eACQqu bGbe51byNjGhV0BPxSVFTggiqeEMb4rf84x6/aarBNgghxlqm6cqdG2aDi5W9zH4dR69 b+pmJB6OSpPtzprsIunmyLJR3N8s1oAYS5KwfsFoZY6RROD0g8RG5PiiojZtJtc8Of2c ONOZmx0WmzV1qBRkE7EzvE0lHNDwKl9ox/WjBm8azTqmNzUAwne/z+oxwyPVxNa8FiHA rQOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n8-20020a819e48000000b005a2013b78c0si3199683ywj.515.2023.10.27.09.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 646AC831E876; Fri, 27 Oct 2023 09:44:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231721AbjJ0Qo1 (ORCPT + 99 others); Fri, 27 Oct 2023 12:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231305AbjJ0Qo0 (ORCPT ); Fri, 27 Oct 2023 12:44:26 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A821B10A for ; Fri, 27 Oct 2023 09:44:24 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C9CAC433C8; Fri, 27 Oct 2023 16:44:21 +0000 (UTC) Date: Fri, 27 Oct 2023 12:44:19 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Peter Zijlstra , 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 v2] sched: Extended Scheduler Time Slice Message-ID: <20231027124419.4638d25d@gandalf.local.home> In-Reply-To: <0b88d73c-c1c0-4ed8-9e63-b54698fbc039@efficios.com> References: <20231025235413.597287e1@gandalf.local.home> <20231026105944.GJ33965@noisy.programming.kicks-ass.net> <20231026071413.4ed47b0e@gandalf.local.home> <20231026152022.668ca0f3@gandalf.local.home> <20231026173527.2ad215cc@gandalf.local.home> <0b88d73c-c1c0-4ed8-9e63-b54698fbc039@efficios.com> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 09:44:33 -0700 (PDT) On Fri, 27 Oct 2023 12:21:45 -0400 Mathieu Desnoyers wrote: > > Attached is the updated test program. > > I think you'll want to modify the semantic of your "cr_flags" field so > it supports nested locks as well. You can change this cr_flags for a > nesting counter. The "yield" bit could be one of the bits of that > counter (e.g. lowest bit). Hmm, yeah, we could just have it be: bit 0 set by the kernel, and allow user space set any bit above that to say "I'm in a critical section". Then, the kernel would do: if (cr_flags & ~1) // in critical section and this would allow user space to us cr_flags as the nested counter if it wants to. I just don't want that to be a kernel requirement, but allowing *any* bit to be set above bit 0 would allow user space to decide that or not. > > Therefore extend() become add 0x2, and unextend() become a sub 0x2, and > you can check the lowest bit for yield hint. Right, that makes sense. I'll update that in the next version. Thanks! -- Steve