From nobody Mon Jan 19 16:16:34 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dvwZY1svgz6P16k for ; Mon, 19 Jan 2026 16:16:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dvwZX4fHvz3wdh for ; Mon, 19 Jan 2026 16:16:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 60JGGZeX026787; Mon, 19 Jan 2026 18:16:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 60JGGZeX026787 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 60JGGYIN026786; Mon, 19 Jan 2026 18:16:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 19 Jan 2026 18:16:34 +0200 From: Konstantin Belousov To: Minsoo Choo Cc: George Mitchell , freebsd-hackers@freebsd.org Subject: Re: Current ULE state and plans (was Re: HMP scheduling on FreeBSD) Message-ID: References: <0Ng09S3rEB0BvT9vzHqVKU7rWxoad96kjEc7U2LCwDFJKmmswXujip7qbRlo_BIhNKcI7d-2CUHdp9Dxr3-7hhafpD6uagJSFUCjtC9qRr4=@proton.me> <1886427.OVFmXjEfDW@ravel> <6tOKBjzm6105PhWG7uokCxT9_vl6KFcdZlDDZqLtJHLinaU79t1KirKeB0BU0PNg0iMFOQrbQoLLrfGQGw8ku2M-xpvO15tXI1WzdLAQ4m4=@proton.me> <5507816.iRejcm9W5r@ravel> <2ff9f897-83b9-4dd2-a41f-7d248a0da0ce@m5p.com> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; TAGGED_RCPT(0.00)[freebsd] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dvwZX4fHvz3wdh On Mon, Jan 19, 2026 at 02:59:10PM +0000, Minsoo Choo wrote: > On Monday, January 19th, 2026 at 9:30 AM, George Mitchell wrote: > > > > > > > On 1/19/26 09:17, Olivier Certner wrote: > > > > > Hi, > > > > > > This is a mail intended to spread the news. I must also admit to getting a bit tired to see the same misconceptions and falsities on ULE, and even on schedulers in general, repeated over long periods of time by several people. > > > [...] > > > One of my personal goals is to deprecate 4BSD in 16 if possible, as it is more and more irrelevant on modern machines and seems too lightly tested. > > > > > [...] > > > > Thanks for this explanation and progress report. > > > > Rather than deprecating 4BSD, has anyone thought about making it a load > > time tunable, perhaps even a loadable kernel module? Or, in the world > > of packages for base, having the scheduler be its own package? > > Especially if someone wants to write yet another scheduler? -- George > > That would be something similar to sched-ext on Linux except it is kernel module not eBPF. It's worth considering but cleaning up scheduler interface should be done first. > It is not much depends on the scheduler interface, and in fact making the 4bsd and ule modules is almost trivial. Almost because of cpu_switch.S cpu_switch() code, which must not wait for blocked thread lock to unblock for 4bsd, on all architectures. The hard part was make the struct thread scheduler addend scheduler-agnostic, but this is done. See how the allocations from the thread_zone are sized, and thread0_storage is set. There are also two other places in x86/ which depends on ule, one adding full seqcst fence, which can be done unconditionally in cpu_machdep.c, and another in local_apic() which might require adding one more sched_XXX() function.