5 ms·
Windows moved basic graphics driver functionality to user space many, many years ago. (Windows Vista) >Badly written device drivers can cause severe damage to
by GeekyBear 7y ago
Windows moved basic graphics driver functionality to user space many, many years ago. (Windows Vista)
>Badly written device drivers can cause severe damage to a system (e.g., BSoD and data corruption) since all standard drivers have high privileges when accessing the kernel directly. The User-Mode Driver Framework insulates the kernel from the problems of direct driver access, instead providing a new class of driver with a dedicated application programming interface at the user level of interrupts and memory management.
If an error occurs, the new framework allows for an immediate driver restart without impacting the system.
https://en.m.wikipedia.org/wiki/User-Mode_Driver_Framework https://en.m.wikipedia.org/wiki/User-Mode_Driver_Framework
Has Windows suffered from this change or has the added stability of having a graphics stack capable of restarting itself on error instead of blue screening the entire machine been a good thing?
- wmf 7y agoGraphics and network stacks are very different. It sounds like macOS is going to have the entire network stack in the kernel except for extensions; this could be the worst of all worlds for performance.
- flatiron 7y agoGotta get rid of all my Mac OS network switches.... I think they value the security and reliability from evicting those kernel extensions and nobody dreams of using this in some high performance production switch so I think it’s ok.
- monocasa 7y agoA lot of Macs get used for video editing where they love their SANs. This cuts into video editing perf.
- _rs 7y agoJust to clarify, this would only be a problem if the user had network extensions installed (and potentially lots of them, depending on implementation)? It could have negligible impact if the video editing workstation didn't have these installed, if I'm reading this right?
- monocasa 7y agoI'm just saying there's a lot of use cases where people actually saturate their network connections on workstations, and you shouldn't discount them just because 'I'm not running mac as a switch'. But yes, network perf is needed only for workflows that involve large remote resources, and not to all video editing use cases out there.
- flatiron 7y agoYou can still saturate your network connection. Just takes a bit of context switching to user land. So if you have a crazy core hyperthreaded cpu your 1 gig network connection will easily get filled without a blink. This is like the ssl argument at the beginning of encrypting everything. The world was going to end and then it didn’t
- monocasa 7y agoContext switches can absolutely cut into maximum bandwidth and leave you unable to saturate a network.
- Dylan16807 7y agoIn certain machines with very weak CPUs and/or many very powerful connections. For a workstation, assuming mild levels of competence, there's no issue.
- monocasa 7y agoNo, on workstations and servers, particularly in a post spectre world, putting your network drivers into user space will absolutely destroy your perf because of the added context switches. You'd maybe have a point if it were an L4, but mach ports are used as an example now of how not to do microkernel IPC because of how much overhead they use.
- GeekyBear 7y agoIf this were a big issue, people would have noticed a correspondingly large impact on Windows gaming performance.
- deleted 7y ago[deleted]
- chupasaurus 7y agoAll GPU consumers in Windows (AFAIK even OS itself besides the bootloader) are userspace programs calling APIs hence userspace driver isn't a big problem. The network stack in Windows is a part of the kernel and I haven't heard of userspace implementations of it like DPDK or PF_RING in Linux. GP is wrong about the performance of them though, as you can actually enhance it in a userspace mode (good article from Cloudflare [0]). [0] https://blog.cloudflare.com/why-we-use-the-linux-kernels-tcp-stack/ https://blog.cloudflare.com/why-we-use-the-linux-kernels-tcp...
- kalleboo 7y agoDoesn't the network stack end with sending everything to userspace (user applications) in the end anyway? As long as it doesn't take multiple round trips...
- chupasaurus 7y agoFirewall is also a part of kernel (dunno about macOS though) so the traffic might not come out.
- wmf 7y agoMultiple round trips is exactly what I'm concerned about. Imagine a connection going from, say, Safari to the kernel to Little Snitch to the kernel to the NIC. It may not work this way though. Anything tun-based tends to have the same problem.
- why_only_15 7y agoActually, almost all of the networking stack is moving out of the kernel with Skywalk.
- amaccuish 7y agoWhere can I find more info about Skywalk?
- why_only_15 7y agoThis is the only public place: http://newosxbook.com/bonus/vol1ch16.html http://newosxbook.com/bonus/vol1ch16.html. Skywalk is an asynchronous networking interface designed to be adaptable to a number of different needs. I'm not really a networking person so I don't know a lot about it, but mostly the kernel gets out of your way and writes out a bunch of data in a ring buffer of some kind asynchronously or something. The goal is to be able to have different use cases customized to their own needs, so the HTTP stack can write its own custom stuff to be optimized for that use case and the same for the IDS stuff or bluetooth stuff etc. Most people quoted a 30-50% reduction in overall cpu usage for a wide range of scenarios.
- CameronNemo 7y agoThis is quite interesting information! I wish it were closer to the top of this thread.
- vbernat 7y agoI think it is likely that only the slow path (first packet of each flow) will move to userland. The fast path will still be handled in kernel.
- fredsanford 7y agoI don't remember UMDF as supporting video drivers. It was mostly pluggable stuff like USB storage, sound etc. But I haven' touched that stuff since 2005 or so. Anyone that remembers WinNT 3.51 or so would likely remember the horrible video performance before most windows graphics code was moved to the kernel in win32k.sys...