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 97D2DC25B6B for ; Thu, 26 Oct 2023 20:45:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E842E6B034B; Thu, 26 Oct 2023 16:45:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E34AD6B034D; Thu, 26 Oct 2023 16:45:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFCD06B034E; Thu, 26 Oct 2023 16:45:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BC6A76B034B for ; Thu, 26 Oct 2023 16:45:58 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 759ACB5E3D for ; Thu, 26 Oct 2023 20:45:58 +0000 (UTC) X-FDA: 81388794396.07.7468B6C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id D12201C0004 for ; Thu, 26 Oct 2023 20:45:55 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of "SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698353155; 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=5l17783inpQmBU770M1vw4azlJsudSD/81dK4El/J7U=; b=B6xJy/7dL3Selnh8vtbUqKy91snkyrr3pqBRY07LYKky5E4Z+IVoFAmnOShmhjiYSRGIDm QvhqCti6pSSMLEn2Y0Pfe2wQhJRX84F2oQZUiIQ/L4PjxhoAChdnE8SrfET/Eydwo4MHGV YJK5BBAyYdX8a8y2FbAT1rj9OpO6SiU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698353155; a=rsa-sha256; cv=none; b=FA9c6NMyGoh+q6FEl4PiA4e34I9p/olooXqLRenUaHQ+ZCqEESkwpksdYINKmvWoQhE+nw KeqaVufCdk49pCeO5NlO//MuZJrDQEUQlMsCPyIYApxUQ1NzeXXD+qTBrogu6Bd5nktuTk xfm+/1iuu2Hpyij3lZv6vkwbaisXiwM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; spf=pass (imf20.hostedemail.com: domain of "SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=xBQK=GI=goodmis.org=rostedt@kernel.org"; dmarc=none Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 793DF60FB0; Thu, 26 Oct 2023 20:45:54 +0000 (UTC) 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-Rspamd-Queue-Id: D12201C0004 X-Rspam-User: X-Stat-Signature: imey6xweyptm461ao3z3og1n9i9h18hw X-Rspamd-Server: rspam03 X-HE-Tag: 1698353155-444999 X-HE-Meta: U2FsdGVkX1//5+rhFFpeYhRS5g8pa/dU4w1bHH6kBinIU/aptgiYUdF9ScsMtU6ZF7o+ydVzVNS/i0Xq9v7goGa670vwl4pLuvVCsvLcFBb8qa7MYsf5iu/8AmG/FEtU/xr9YTd98trE6wnpT9ochw61ipUSnKEJMQyIXQHBd5kvmMHq6RC0u080CmJRZ6R+RzLCYvuK4oVFJ6C4CCh6Om77urBNK9GnH2lV5yf5a3Bs2sIaAyTNW1oZfnqY3yXEzsU2saz+e14hN9bzOFSRKo0AMzcnRNEKafBX08YuYgh7oO0Mmo20DmMUy9A/oUaKJnijYURBLMcHLuWZgzSZt6BcrJRw04zpDNjrOdTkBkBCUZ9EU6M7BN/BiFU4sG0RLfovs7TAm5ASoqMEdRlyyexmIv3aCirQoqpTgQCfAGS6omU3sPa4lWuJL6b1sAZVpjlI7AsxXCkpEG3Amq5k31c4K8t+IhuHjpTfp+EGOIb2X7oBUW4lThLjjzEuydkW4yJH0AhdGEA3JesjFNcy53TQ1sfAq+9vFW0IvxgZtXOdopfT9kdgtNUDPGylp/694lanIddqtYGxl3nGQzGi7e+cilqBd9dJRC4agiLAVc84/cSfxSPlvOjUily2iLEywW6uGnFtfZOafqvb6pGIKR7Jgfz8m6+w6hgpe2tO69xsxDLjOXkL1i6MXlX3LJbEZ3CCRgUWfQJF66XJS8QMbOAfKq/P7kTa6tfaeHEc6Wd/kANf/v+oj0/dnlSMGf7whOm/HpbThsy9P3bcK5mvRFL4nMypPjihnM2j83zz5FyUNf0QdBocI4Xde3CHdaEbhAQsMcyAZNAWEP2ZvdYV+g8VTMwdn7j+J6bP3Q7ZTR4FgLnyf2DfLhqYFjg7rbg2wThmqZw+n9k4U2qMx/BJxF5JlzKAkO+cHuMECXUqnBpvMrbnTqG8XZJ0caneC3agCjCWMPN2YvuFZ5alNRk Hqw3UmM4 x4awSs4kc3GPV9h7O5vA2JEmB5AXiiZVYp1yjvtOudHaSuvZfaiZtpREr4zrKetctAt7CJS2tW6iIPAFcB/Kf+gXkM7ZXm/R0UpY93dxTNZGaH9WEGzPVT+PFp/JTwXWkQuvc2BTp+dmF4VfcDaPj3F5p8hUgBaqEmMKX1LVE6LZZYp+1SRzrcLGUDw3L3UQWIc3otyf0u8NwDoklr8105kodL/IL3q2zgg1PReHts8f6ty+zFxkjASs9ptzBfR78Pm9wPJyLwR6CMqGj5q1GBULt4fACxTrMJJU81mjyPUie1tLeAM3jAf8vreJXERTDyI/sQ+tHTeiXViNcYuA9k4bmbw== 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 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