Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp717570rdh; Thu, 26 Oct 2023 13:46:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoGEyv5RxsBr995cHlxkMjZAL+YZIzQIgHw9/Z8UhBsyOANYTzF+w3c0lzmUXm19Xd3JOg X-Received: by 2002:a25:2611:0:b0:da0:275a:25fb with SMTP id m17-20020a252611000000b00da0275a25fbmr1698750ybm.9.1698353204055; Thu, 26 Oct 2023 13:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698353204; cv=none; d=google.com; s=arc-20160816; b=O5innQFEXHPMFvX8ggwFDZupx1IcbDO7R1Q061fdaN1tP/fqdlsgh2OIkaTbQSoZfy dl/P/QnAH0F+IscxHe0JLZ5VBvgEv7KULoQoNvw4r8N4J434/ddS4z7Vi4V8FK54MZXx 10sXU3TBWBjbenxURdcUChQL7NEPsnV/b4mcsDbzPQhJ7YBjhrHAN+6II0Ujm8FPAlXm yBjg8Rs1gDpnXNodZRajSGQr/N2VarveMlSzSeQX2Q7ui3IVs5HObZFhJ6XeGzApu89g sx/cGfRXLRqb+9ybb4zhLDPi19rXI8YGC2Pvw3WGQmhLlY7LxP+OxSk2NUnbZNAB/DCT 5WYQ== 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=5l17783inpQmBU770M1vw4azlJsudSD/81dK4El/J7U=; fh=SfvE4YKxHarc+4mYRLQvWrf/g5l7JvlvohgguvJ6moM=; b=jzcvzhgA+kyZMM8F4JvlP3LdMABij3RGZMqDV6eb4w6xQ0FR1UEKGEvJlL7cPkK5fz GqVkOLL5HaRNqnoSaFeEbBhj1944SUMVrHEJ/Q2IirB8/eCZ0cLiXJTlg9iE5T0/s0HJ 6iIsmu0PYizndbmnaVPs7mOkj6zK/eUaRtcRCwlwCY01O0tV/8ebtdzl0LP16VyUDNAn VpDr+2YhE83AmFmQAoMI3z9NOzJcrODm5BXZGw1fu1eJLauWvOKkHsHxNQ+LntKOAp7I XO92ysE/KyUcJhL5KJHTxdBb0KFcyENucY9cCnqgvRK1kw2bTNHciLt5I+si2GExnPzk VRkw== 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:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s71-20020a25aa4d000000b00d9940128dd1si336378ybi.738.2023.10.26.13.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 13:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id D60BC80D15AF; Thu, 26 Oct 2023 13:46:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbjJZUqI (ORCPT + 99 others); Thu, 26 Oct 2023 16:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbjJZUqG (ORCPT ); Thu, 26 Oct 2023 16:46:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8861A1AB for ; Thu, 26 Oct 2023 13:45:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D766DC433C8; Thu, 26 Oct 2023 20:45:50 +0000 (UTC) Date: Thu, 26 Oct 2023 16:45:49 -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: <20231026164549.14d45c60@gandalf.local.home> In-Reply-To: <7871472b-a0c4-4475-9671-69a3244f956d@efficios.com> 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> 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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 26 Oct 2023 13:46:21 -0700 (PDT) On Thu, 26 Oct 2023 14:59:13 -0400 Mathieu Desnoyers wrote: > > for a rough implementation of a 'xchg()' without SMP coherency, just > > cpu-local one (ie atomic wrt being preempted by the kernel, but not > > atomic wrt other CPU's accessing the same variable concurrently) > > Actually Steven does not need a xchg to test-and-set a single bit which > is only accessed concurrently between kernel and userspace from the same > thread. Either "bts" or "andb" should work fine. Hmm, how would bts work? Doesn't that just set a bit? I need to clear one bit while seeing if another bit is set. I could also use subl, as that would also atomically clear the bit. -- Steve