Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1269804rdh; Fri, 27 Oct 2023 09:10:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpiDT8vvxlwFOIE+qDjCW2cV4y+nVTntZzwE7NYz0RmpTJjPKUSP/HLa7VFHJRfDrfco16 X-Received: by 2002:a81:9ac9:0:b0:5a7:c973:c82 with SMTP id r192-20020a819ac9000000b005a7c9730c82mr2987481ywg.13.1698423000983; Fri, 27 Oct 2023 09:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698423000; cv=none; d=google.com; s=arc-20160816; b=XezRiGOklck7DsE15pXbOO71R+T5uNBKoPbe4drUZZf18F7P6I9m8rtD+FyV+0E0ZP FO3bN/Acd7U5QYhIVkuNLYkswE5DS+2kdjVE1lDZeE806PN7MpSy/wh0wQ1mt+U0NWf/ YMiWdMccdviTqSIG1ZLPdKhEg9qr5C0IjIxFxU6pUBXg57l9Ze7I3HkC4rOV8rkWATU9 8lcEPfMlq2R1gBn/wk7o1JWsERjXshg6N/3ArQq1Tdnfe0Eqs/kAxyWCv//yDF6++A5Y d/d2VD87WK+z4BhL+CHoswyKEV81jAEd+aVG+/sdn0Mku0KsNljPF3N5/5IM6Y87rElC tptA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=qkuMOKHUq98goSi9QIspdX4fHiYRJoBcebljssYE5sU=; fh=+9NoAVxPvYwneJyT0oIQDXEcD1IcdcUxuoiJK31fxis=; b=Dgfj2CvrUKXPBspBMB/K0+DC+CcYGqJIhij5cA8F82QC/kftJ0xDfOPZK0F+e83z5y aagIykG0PLVrbZosb6qLzajX7Z3wWqVgYokNz9JeMDC8I8YCOwRCBFh2k20deJ+/CXIq YJEmDgJy2kroA3kvumr84LlUXFeR4iA6sPM1aiA7uxlE1P/sFOqYIbAdYGWoTw6nGmyw gcnQsg0gOGjtpo9zyZ0WHHhY8oJn3LsZMlJGUTQNrNrF7j/l8zvK+EZz0Qlj/W0qsbx9 a9hGYai0OkUDmW/9pgr4vvgPTivvNOA81kgbnj020IaWmsM+URrgdDCdId6j61ia+IAt oFOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=jNjKzUUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k4-20020a819304000000b005a7f768804asi3093494ywg.349.2023.10.27.09.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=jNjKzUUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E1CA18374E41; Fri, 27 Oct 2023 09:09:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231955AbjJ0QJs (ORCPT + 99 others); Fri, 27 Oct 2023 12:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbjJ0QJr (ORCPT ); Fri, 27 Oct 2023 12:09:47 -0400 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D4C1B3 for ; Fri, 27 Oct 2023 09:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1698422981; bh=5H2knSLNVRZjGwvUbx+qNm8pfuijDJno13zOo0IuzuU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jNjKzUUAZlZJL/a/KVBndVE/ZSUxYE3u61NVqoDojd5xTvFFmZ9BnPy2fHoAzvv4T VO9CgG96/v6uMW9Nn0KoYaTLLQmSit5G/tR6GXaZjk1374mFeySJyDaolRQu5U+Shu 7mvhbAuFnqIvbvDy/rdtKUFb9vNojrGPow6sM3fx2gi9HK0bWgkwjXSFy2tXlJm2vs lYzIsnxVSM/NhG3rTN5LFti8eTMMpeGV5Nuc1ujMkzL16NDMRLKNlHAJIJxNc58mch dJm6AK/y5IkslkYEcwXS+gLGgsmUx+lpa7XRMMP1ax93W47vBjtVGAxhCJcL0cSI8O 3pkbFKXcknn4w== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SH70N4kCgz1ZPV; Fri, 27 Oct 2023 12:09:40 -0400 (EDT) Message-ID: <644da047-2f7a-4d55-a339-f2dc28d2c852@efficios.com> Date: Fri, 27 Oct 2023 12:09:56 -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> From: Mathieu Desnoyers In-Reply-To: <20231026164549.14d45c60@gandalf.local.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 howler.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 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 09:09:58 -0700 (PDT) On 2023-10-26 16:45, Steven Rostedt wrote: > 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? Yes, and it saves the bit state in the CF flag before setting it. If you need to clear a bit then it would be "btr". > > 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. Ah ok, I did not get that you needed to test for a different bit than the one you clear. Thanks, Mathieu > > -- Steve -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com