Andrew Morton And The Low-Latency Kernel Patch
An Anonymous Coward writes: "KernelTrap has interviewed Linux kernel hacker Andrew Morton, author of the low-latency patch. Though his patch has received less attention than Robert Love's preemptible kernel patch (recently merged into the 2.5 kernel), it results in quite significantly lower latencies. The interview is quite interesting, delving into the low-latency patch, explaining how it works and the differences between it and the preempt patch. He also talks about his ext3 work, porting that journaling filesystem from the older stable 2.2 kernel to the current stable 2.4 kernel."
Is there a formal difference between low latency and a realtime OS?
What about the Timesys kernel patches? How do things match up to QNX another realtime OS??
A day in the life of a kernel hacker.
Mistranscription? or is there YAAIDK (Yet Another Abbreviation I Don't Know) being thrown about?
Writers imply. Readers infer.
I've been waiting for years for Linux to have finer control of process scheduling.
I hope someday that Linux will use a method similar to Irix, where you can specify a priority from 0 to 255, modify it's timeslice, and make it realtime or timeshared. This was one of the best things about Irix, and something I could really use for Linux.
I really like reading things like this.
That's why Linux is so great -- even if you're not good enough to work on the kernel, you can read about some of the issues that pop up. If you use Linux for awhile, and if you get to the point where you roll your own kernels and apply patches, you end up learning a lot about how the system works.
The MS guys are smart, and they're making some good systems now, but you can spend your whole life with them and not have much of a clue about what's going on under the hood.
If MS would open up their internal developer discussions to the public, it would take MS system administration to a whole new level. I understand why they can't do that, but it is a great example of what's nice about Linux.
"With an internally preemptible kernel the explicit task yielding is not necessary, because the context switch is performed in the interrupt return path and via open-coded yields which are hidden in the unlock code. But you cannot preempt an in-kernel process while it holds locks, so all the unlock, relock and fixup code is needed in either approach."
:)
Try getting your head round that one when needing sleep
He also talks about his ext3 work, porting that
journaling filesystem from the older stable 2.2 kernel to the current stable 2.4 kernel."
I'm confused... I was under the impression that most of the journaling file systems required 2.4. Granted, many started their life on 2.2, but still... most recommend or require 2.4.
On a side note, support for XFS and/or ext3 for 2.2 would be very nice as we currently have many servers running Debian (potato) with kernel 2.2. We would consider upgrading the filesystem, but little else. "If it ain't broke, don't fix it". About all that doesn't work well now is ext2... fsck sucks... we have 2 hours of UPS, but no generators... living in Vermont means a 4 hour power outtage about three times a year.
"The low-latency patch yields worst-case latencies of around 1.5 milliseconds at present. The preempt patch is around 80 milliseconds,
but with the locking changes it should also yield 1-2 millisecond latencies." On what speed processor? 1.5ms is way too long for any kind of processor being sold these days. Try 100us maximum latency on a 133Mhz Pentium for starters and go down from there. And learn to use the term "deterministic" and I might raise an eyebrow. Make it POSIX 1003.1 compliant and someone will have a serious solution.
Programmers either need deterministic response in their applications or they don't. If they do, then Linux is not their OS. If they don't, then these half-baked solutions to reduce context switching time and interrupt latency are probably going to be fun to play with, but will cause nightmares in the long run.
> it does not support ./configure
./configure doesn't support BSD? Afterall, it's configure that has the interest in 'configuring' on as many platforms as possible -- not BSDs job to look and act like the next guy.
./configure thingy.
Quite funny. Wouldn't that be
Anyhow.. Back to compiling Postgresql and friends under Windows using that
Rod Taylor
Andrew Morton And The Low-Latency Kernel Patch
:)
.)"
Sounds just like a title of a bedtime story.
I also recommend you read "How CowboyNeal saved the world (with a little help from / and
IMHO, SoftUpdates are better than Journalled File Systems. There's no journal file to maintain, just careful ordering of the writes. Why no discussion of it for Linux?
This may be a corrupt sector containing metadata (maybe even for the "/" directory or "/kernel", if you were writing a new kernel at the time of the crash), or it may be other corrupt data which became corrupted in a cascade failure that resulted in the crash after one or more corrupted blocks were written to disk.
Soft updates simply can't recover from this.
If, on the other hand, it were a kernel panic that didn't result in corrupt data being written to disk, then there's no danger of a corrupt sector from a DC failure, and there is no danger of other corrupt data needing fsck'ing, so you would be in the situation where the only thing that would be out of date is the cylinder group bitmaps; you could clean this in the background by "locking" access on a cylinder group by cylinder group basis for a short period of time, to clear bits in the bitmap that said an unallocated sector was allocated. This might be seen as brief stalls by an especially observant user or program (say someone is doing profiling of code at the time), but could be accomplished in the background.
The problem is that you can not know the reason for the crash, until after the recovery.
If there were available CMOS, you could write a "power failure" value into it at boot time, and then write a "safe panic" or an "unsafe panic" code into it at crash time (a power failure would leave the "power failure" code there).
The only valid background case would be for a "safe panic", if you could really guarantee such a thing.
The worst possible failure resulting in a reboot is a hardware failure of the disk; I would really be loathe to try cleaning in the background after a track failure or even a sector failure (sector failures are identical to sector format corruption after a DC failure during a write, FWIW).
Look, soft updates are a good thing, but they aren't a panacea for all problems. Let's laud them for what they do right, but not misrepresent them as doing something they can't.
~shiny
WILL HACK FOR $$$
Unfortunately...
Adding three parantheses, does not improve the flow, by a significant factor, of the quote.
So, does anyone think I would get any performance improvement if I compiled this in to my kernel on my file/web/ssh/blah server? I dont want to lose my precious uptime unless its really worth it.
Ok. Let's say a processor does an instruction in 500 picoseconds on average for a little burst, reading from L1. At that rate, you tell the processor, "I'm doubling your workload, and hurry the hell up." So the introduced CPU latency adds up to--what?--something on the order of a hundred nanoseconds. Of course that depends on a bazillion things; I'm not sure, but I understand the context.
At 100 MHz, a wire or trace carrying current rings easily and resonantly if it is about 10 inches long. At 1 GHz, 1 inch is a very long distance. If there is some sort of ground plane, it is its own tank circuit--guaranteed messy--making things that much worse. Put your finger nearby, and watch the form shift on the oscilloscope. Not good. Now try to speed that up, and what do you get? Bottlenecks.
We hear about Moore's Law this and Moore's Law that. Inside the chip, that's fine. Outside the chip--while trying to approach significant fractions of 1Gz--we have already reached diminishing returns. So people come along and start to reverse the trend of CPU-work offloading. (Consider the old "Advaned Technology" bus using direct memory access and bus mastering of peripherals while processors were running at 12 MHz.) It doesn't make sense to do that anymore, and anyone who knows how to build kernels knows this. Because of the bus/crossbar/backplane/fabric delays, CPU's will just slack off anyway, waiting for data.
If you look at the proposed specifications of PCI bus replacement technology, it's basically a local area network inside the beige box of the future. Everything is based on protocols. For all you know, within only a few years, data will be compressed and decompressed between a processor-L1-etc amalgam and a hard disk drive. It will be essentially like a modem connection. Fibre Channel disks are almost there already. By the time this stuff becomes generic, the customer's internal questions will be about the tradeoffs between bottlenecking or peripheral interfacing at all. Upgrades will be of a different form altogether. They will have to be.
It's been stated that the realtime patch lowers the throughput of linux, while making the responsiveness quite good. Meaning good for destop use bad for server use.
Now my question. What does the low-latency patch do to the throughput? Increase? Decrease? Stay the same, but everything is just 'snappier'?
If Mr. Edison had thought smarter he wouldn't sweat as much. --Nikola Tesla
I don't know about the low-latency patch, but the preemptive patch actually increases throughput in most servers, due to i/o operations being done asap.
There are some cases where the preemptive patch lowers throughput, but in the majority of cases it only helps.
XML is like violence. If it doesn't solve the problem, use more.
I read this as Andrew Motion and the Low-Latency Kernel Patch.
If you moderate me down I shall become more powerful than you can possibly imagine.
Maybe that project needs somebody to make it full-baked. You seem to know enough about kernels so why not help them? And don't forget to add that "deterministic"-thingy to the next release.
Preserve old classics: copy your collection onto all hard drives.
They are not exactly embedded. Both use a microkernel architecture allows them to run the rest of the OS in a separate process within the microkernel. But they do have a form of X windows and can be run on the desktop. Of course you can also strip them down, flash them, and run them in an embedded environment. Of course, the task switching latency is supposed to be higher than that of other truly embedded RTOSs like VxWorks and pSOS.