Originally posted by oiaohm
View Post
Announcement
Collapse
No announcement yet.
Linux Kernel Getting io_uring To Deliver Fast & Efficient I/O
Collapse
X
-
Last edited by rene; 15 February 2019, 05:52 AM.
- Likes 1
-
Originally posted by jabl View Post
Efficient network I/O has already been solved a long time ago with epoll. This patchset (io_uring) delivers efficient asynchronous file I/O, including for buffered file I/O which wasn't possible with the old file AIO interface (io_submit() etc.).
Comment
-
Originally posted by polarathene View PostI thought there was quite a bit of discussion about how FreeBSD handles network I/O better than Linux? (no links, or specifics that I can recall though)
- Likes 3
Comment
-
Originally posted by oiaohm View Post
Problem with your idea its already been tried in the Linux kernel did not provide the performance boost anywhere near expected. Linux kernel is no where near as simple as you think it is.
Thank you for taking the time to post that. That was very informative.
- Likes 2
Comment
-
Originally posted by rene View Posta short note to a long story: i386 and later have an i/o permission bitmap for supposedly fine grained i/o permission control, also modern hardware is anyway not using classic i/o ports, with (nearly) everything memory mapped ring 3 drivers can drive the hardware just fine without any extra i/o context switching..
Theory vs reality. Iommu that you are talking about with it on you are at best down to 90% of the throughput to the compared compared to iommu off. This is without needing to syscall into the kernel to adjust iommu or having kernel call your userspace driver requesting that it give back memory.
Originally posted by rene View PostAlso QNX is quite fast, even was a decade ago, so it is not like it is impossible to do. Also more elegant architecture and algorithms can vastly improve performance, e.g. look at the current graphic subsystem performance.
The scheduler things that gave QNX better responsiveness are fairly much mainline Linux now. Please note I said better responsiveness not better performance straight line processing performance..
Remember how I said Linux kernel is hybrid.
You see on Linux user space style file systems like micro kernel user put head to head with monolithic style file system driver here. You will also see Linux do this with network drivers as well..
These ring buffers that Linux kernel is getting was one of the tricks QNX and other Microkernels used to keep up historically against monolithic. So the elegant architecture part of Microkernels that reduced context switches Linux kernel is also getting with ring buffers and other zero copy optimisations. Linux kernel is getting more and more of the microkernel elegant methods of reducing context switch and have the monolithic ugly way of reducing context switches and a more modern way with bpf of achieving a lot of the monolithic kernel performance boosts with less security risk.
How were microkernels historically able to keep up and beat historic monolithic kernels..
1) The process to process optimisations microkernels had over monolithic reduced the syscall overhead from application to kernel a lot. This worked out more than the syscalls to the services processing the application request at the time. Problem here is Linux is taking in all of these microkernel gains. So now as a microkernel you don't have syscall saving from application to kernel. Now each context switch between your individual microkernel drivers cost you and put you behind a Linux form of monolithic in performance.
2) Multi threading. Problem is current day Linux kernel is multi threading and NUMA so it is running multi processes.
This is the problem. The tricks microkernels had to claw back performance are no longer unique to Microkernels the Linux kernel uses them as well.
Of course the historic monolithic and microkernels did not have bpf with jit either. This creates a very interest problem. Yes the bpf item breaks the rule of microkernel of all the driver in user-space but if a microkernel like design wants to keep up it will need some for of syscall reduction in kernel space way more complex than just bundling syscalls. This reduction is application puts up request kernel answers from cache with logic if it can resulting in not need to context switch though the driver tree of the microkernel like system of course this is not going to be a microkernel because you will have some of your driver processing in kernel space for performance this in unavoidable. Also when you need to context switch though the userspace driver tree to get stuff done you are going to be slower than the Linux kernel.
Also remember a monolithic kernel can disable like iommu and other security things to just to gain speed. Being a Microkernel you will have to turn these features on just to attempt to get close to the monolithic when it has the security features on. As soon as monolichic starts giving up security for speed there is no way with current design microkernels to keep up.
To make something like a microkernel that can perform against modern day linux kernel will require some very hard choices to optimise it and breaking what it means to be a micro-kernel in places.
- Likes 2
Comment
-
Originally posted by oiaohm View PostTo make something like a microkernel that can perform against modern day linux kernel will require some very hard choices to optimise it and breaking what it means to be a micro-kernel in places.
Microkernel: start with a clean sheet. Design a "perfect" model. Render it. Figure out where you're taking a kick in the teeth. Alter that bit, and only that bit, and call it an "optimization."
Monolithic kernel: start with a clean sheet. Design a "perfect" model. Render it. Figure out where you're taking a kick in the teeth. Alter that bit, and only that bit, and call it an "optimization."
As long as you don't muddy the entire thing up you're fine. Work on cleaning up the optimizations.
So the "monolithic" turns into a hybrid - it starts with a clean monolithic design and then gets "optimizations" from the other side of the fence.
So the "microkernel" turns into a hybrid - it starts with a clean microkernel design and then gets "optimizations" from the other side of the fence.
Then a third type, not available when those two were around, enters the arena to replace those two.
Then there are three. All having started from clean models. Received "optimizations" to compete.
Until yet another arrives. Then there will be four.
Rinse and repeated. Endlessly.
How many new programming languages do we have? All designed to be the "one true language" and replace the previous ones.
It always works that way.
Except for COBOL. Tell me that's dead. Please.
Comment
-
Originally posted by Farmer View PostMicrokernel: start with a clean sheet. Design a "perfect" model. Render it. Figure out where you're taking a kick in the teeth. Alter that bit, and only that bit, and call it an "optimization."
Monolithic kernel: start with a clean sheet. Design a "perfect" model. Render it. Figure out where you're taking a kick in the teeth. Alter that bit, and only that bit, and call it an "optimization."
So the "monolithic" turns into a hybrid - it starts with a clean monolithic design and then gets "optimizations" from the other side of the fence.
So the "microkernel" turns into a hybrid - it starts with a clean microkernel design and then gets "optimizations" from the other side of the fence.
Originally posted by Farmer View PostThen a third type, not available when those two were around, enters the arena to replace those two.
Really the Linux kernel coming the cross roads between micro-kernel, monolithic and verified byte-code in kernel space design these days
Originally posted by Farmer View PostAll having started from clean models. Received "optimizations" to compete.
Linux kernel is a true bitzer so when a new model of operating systems appear the developer on Linux look it over and over time bring features of it back into LInux.
This also makes Linux interesting place for comparing the advantages of different OS models because Linux is pure anything but a mixture of the different design models.
Yes calling Linux kernel a monolithic only ignores the kernels history. Early Linux was mostly monolithic key word mostly there were fragments of stuff like microkernel in the network stack. Of course later Linux kernel gets uio and fuse.
Yes proper support for user mode drivers as user space programs. This is like the next generation.
Then we come forwards to bpfilter where you now have kernel loadable .ko modules that are part userspace and kernel space and bpf. Yes part monolithic, part micro-kernel, part verifiable byte-code as one driver to be handled by the kernel. This is a true bitzer.
So Linux just progressive more hybridisation of the models. Network stacks very rarely have been pure monolithic, mirco-kernel or bytecode most have been a bitzer to perform well. Linux kernel is these days seams to be following the path how did network stacks manage to be mostly secure and perform well and apply this to complete OS. Yes there is a 4 model that is not Microkernel, monolithic or byte code verified that is where the Linux kernel seams to be heading and that model as yet does not have a clear name. .
Originally posted by Farmer View PostExcept for COBOL. Tell me that's dead. Please.
Comment
-
Originally posted by oiaohm View Post
That gets you to the start of the Linux kernel.
Yes a third type of OS did appear with the SUN Java OS. That is JIT from a verifiable byte-code in kernel space. Linux kernel is getting this as bpf.
Really the Linux kernel coming the cross roads between micro-kernel, monolithic and verified byte-code in kernel space design these days
Linus did not have at the start of Linux the idea that the Linux kernel would be a clean model. Performance was important factor in the path Linus has taken Linux down. The Linux kernel early network stack had drivers in userspace and kernel space this was 100 percent not monolithic or micro-kernel it was the start of the Linux hybrid bitzer nature.
Linux kernel is a true bitzer so when a new model of operating systems appear the developer on Linux look it over and over time bring features of it back into LInux.
This also makes Linux interesting place for comparing the advantages of different OS models because Linux is pure anything but a mixture of the different design models.
Yes calling Linux kernel a monolithic only ignores the kernels history. Early Linux was mostly monolithic key word mostly there were fragments of stuff like microkernel in the network stack. Of course later Linux kernel gets uio and fuse.
Yes proper support for user mode drivers as user space programs. This is like the next generation.
Then we come forwards to bpfilter where you now have kernel loadable .ko modules that are part userspace and kernel space and bpf. Yes part monolithic, part micro-kernel, part verifiable byte-code as one driver to be handled by the kernel. This is a true bitzer.
So Linux just progressive more hybridisation of the models. Network stacks very rarely have been pure monolithic, mirco-kernel or bytecode most have been a bitzer to perform well. Linux kernel is these days seams to be following the path how did network stacks manage to be mostly secure and perform well and apply this to complete OS. Yes there is a 4 model that is not Microkernel, monolithic or byte code verified that is where the Linux kernel seams to be heading and that model as yet does not have a clear name. .
No sorry it not dead companies are still looking for COBOL programmers.
That you for that. It was informative.
Comment
-
Comment