Linux 6.10 To Merge NTSYNC Driver For Emulating Windows NT Synchronization Primitives

Written by Michael Larabel in Linux Gaming on 14 April 2024 at 10:09 AM EDT. 37 Comments
LINUX GAMING
Going through my usual scanning of all the "-next" Git subsystem branches of new code set to be introduced for the next Linux kernel merge window, a very notable addition was just queued up... Linux 6.10 is set to merge the NTSYNC driver for emulating the Microsoft Windows NT synchronization primitives within the kernel for allowing better performance with Valve's Steam Play (Proton) and Wine of Windows games and other apps on Linux.

The past several months has seen much work on the NTSYNC kernel driver for allowing better Wine (Windows) gaming/app performance on Linux. The code has gone through several revisions and has shown very promising results:

NTSYNC results


Wine currently emulates the Windows API in user-space but the NT synchronization primitives have been a hassle to properly emulate in user-space and incurs significant performance overhead. But now with the NTSYNC driver, the situation is a big improvement. The NTSYNC module provides kernel support for emulating of Windows NT synchronization primitives and is exposed as a misc character device by the kernel.
"ntsync uses a misc device as the simplest and least intrusive uAPI interface.

Each file description on the device represents an isolated NT instance, intended to correspond to a single NT virtual machine."

The driver currently provides NTSYNC_IOC_CREATE_SEM for matching the Windows NT system call of NtCreateSemaphore() and NTSYNC_IOC_SEM_POST for matching the NtReleaseSemaphore() behavior found on Windows. CodeWeavers' Elizabeth Figura has been leading this effort with CodeWeavers collaborating with Valve and other stakeholders.

NTSYNC driver queued in -next


It was very exciting to see this morning that Greg Kroah-Hartman has queued the NTSYNC patches into char/misc's char-misc-next branch. With the patches now residing there, they will be submitted for the Linux 6.10 merge window opening up in May and then debuting as stable this summer -- barring any last minute issues or objections raised by Linus Torvalds.

Very exciting year for Linux gamers with NTSYNC going mainline, ongoing work around HDR and other display improvements, and all of the Wayland advancements being made, among the usual Linux hardware support advancements and other common kernel milestones being seen in 2024.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week