LWN: Comments on "OSADL on realtime Linux determinism" https://lwn.net/Articles/490394/ This is a special feed containing comments posted to the individual LWN article titled "OSADL on realtime Linux determinism". en-us Sun, 07 Sep 2025 22:28:47 +0000 Sun, 07 Sep 2025 22:28:47 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net More than 2300 wakeup cycles per second https://lwn.net/Articles/491541/ https://lwn.net/Articles/491541/ zooko <div class="FormattedComment"> Does anybody have links to issue tickets for these three issues? I'd like to keep track, see if I can upgrade or switch tools or maybe even do a patch review or something.<br> </div> Tue, 10 Apr 2012 20:47:30 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/491096/ https://lwn.net/Articles/491096/ madscientist <div class="FormattedComment"> Ready solution (to at least part): xterm! I never use gnome-terminal myself: too much overhead.<br> </div> Sat, 07 Apr 2012 18:15:27 +0000 How does a latency plot of a non-RT system looks like? https://lwn.net/Articles/491049/ https://lwn.net/Articles/491049/ cemde <div class="FormattedComment"> For comparison purposes, rack #1/slot #8 of the OSADL QA Farm hosts an Intel Atom CPU Z530 @1600 MHz board that runs a stock Fedora 12 kernel and undergoes the same real-time tests as the RT systems mentioned in the article. Let the images speak for themselves:<br> Most recent single latency plot -&gt; <a href="https://www.osadl.org/?id=869">https://www.osadl.org/?id=869</a><br> Repeated latency plots -&gt; <a href="https://www.osadl.org/fileadmin/media/r1s8-60.jpeg">https://www.osadl.org/fileadmin/media/r1s8-60.jpeg</a><br> </div> Sat, 07 Apr 2012 11:31:25 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490964/ https://lwn.net/Articles/490964/ jzbiciak <P>Hmmm... I can't even decide whose fault it is for all this. It looks like a little from column "A", a little from column "B" and a little from column "C":</P> <UL><LI>There doesn't seem to be a way to tell evince not to watch the directory containing the PDF file it's viewing.</LI> <LI>There doesn't seem to be a way to make gnome-terminal not update a file in<TT> /tmp </TT>every time it gets a line of display output. (But boy, is there a <A rel="nofollow" HREF="https://bugzilla.gnome.org/show_bug.cgi?id=631685">discussion on it!</A> At least they're going to move to a different directory, it appears.)</LI> <LI>The kernel is sending file-change notifications to evince based on it watching<TT> /tmp</TT>, but the files that changed are unlinked, and their fds aren't open by evince. "Something you can't see and can never see changed." Whaa?</LI> </UL> <P>At least I can come out of the rabbit hole, even if I don't have a ready solution. :-P</P> Fri, 06 Apr 2012 16:33:14 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490957/ https://lwn.net/Articles/490957/ jzbiciak <P>Aha... Many of these PDFs live in<TT> /tmp</TT>. Evince watches the directory holding the PDF so that it can (for better or for worse) auto-refresh if the file its displaying gets replaced with an updated version. Instead, it just gets a bunch of update events for all of the "vteXXXX" files that are actually <I>deleted(<B>!</B>)</I> but still open for all of my umpteen<TT> gnome-terminal </TT>windows.</P> <P>Wow, is THAT a worthless use of resources!</P> Fri, 06 Apr 2012 15:54:55 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490954/ https://lwn.net/Articles/490954/ jzbiciak <P>Well, all right then. Just before I started typing this reply, I echo'd a 1 into<TT> /proc/timer_stats </TT>to see what it might turn up. And what do we have here, 2 minutes later?</P> <P>Oy... plenty! Actually, the interrupt profile seems pretty diffuse. One standout is the gazillion evince processes I have running. I have a horrible habit of opening data sheets / documentation PDFs, and then leaving them open.<TT> strace -p &lt;</TT><I>pid of random evince</I><TT>&gt; </TT> ... Holy cats! That's a busy-looking poll loop that does.... nothing useful? The<TT> inotify </TT>file descriptor apparently has plenty to tell evince (about 3.3K worth each<TT> poll()</TT>), but why? Hmmm.</P> <P>Curiouser and curiouser. Now I'm off to go down this rabbit hole...</P> Fri, 06 Apr 2012 15:24:32 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490933/ https://lwn.net/Articles/490933/ cladisch <blockquote>I do have <tt>/proc/timer_stats</tt></blockquote> <p>So your kernel <em>has</em> the statistics gathering code.</p> <blockquote>but it provides nothing interesting</blockquote> <p><a rel="nofollow" href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;hb=HEAD;f=Documentation/timers/timer_stats.txt">RTFM</a></p> Fri, 06 Apr 2012 08:04:03 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490930/ https://lwn.net/Articles/490930/ jzbiciak <P>I do have<TT> /proc/timer_stats</TT>, but it provides nothing interesting:</P> <PRE> $ cat /proc/timer_stats Timer Stats Version: v0.2 Sample period: 0.000 s 0 total events </PRE> <P>Ah well. And yes, you are correct that I'm not in the habit of compiling kernel updates. I suspect I'd have to move to a more tinker-friendly distro to make that a reality.</P> <P>I have to admit, I got out of the habit of compiling my own kernels just a bit before it got popular for distros to wrap a bunch of magic up in the kernel build process--initrd and all these related toys. I think the last "customized" kernel I compiled and booted was an early 2.6 series kernel, pre 2.6.9. The stock distro kernel has been "good enough" for almost a decade, if not more.</P> <P>Perhaps I'm just being a wuss or maybe I just don't care enough, but the last time I tried compiling a custom kernel on one of my machines, I eventually ran away screaming. That was only after a day or two of fighting with it that I finally gave up and went back to a vender kernel.</P> <P>(The last two times I believe I tried this were on RedHat 8 or 9 (pre-Fedora) and Ubuntu. Something tells me if I tried this, say, on Slackware or even Debian, I would be telling a different story.)</P> Fri, 06 Apr 2012 07:35:18 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490615/ https://lwn.net/Articles/490615/ cladisch <div class="FormattedComment"> Rescheduling interrupts happen also when some process gets woken up, which is what typically happens when a timer fires.<br> <p> To find out where all the timer interrupts come from, enable timer usage statistics (see Documentation/timers/timer_stats.txt).<br> If you don't have /proc/timer_stats, you have to enable CONFIG_TIMER_STATS, but given your kernel version, you're probably not in the habit of recompiling it.<br> </div> Wed, 04 Apr 2012 14:59:20 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490588/ https://lwn.net/Articles/490588/ njs <div class="FormattedComment"> I believe that a "rescheduling interrupt" is what happens when a process gets kicked off the CPU after using up its timeslice (as opposed to voluntarily blocking).<br> </div> Wed, 04 Apr 2012 12:31:10 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490548/ https://lwn.net/Articles/490548/ jzbiciak <P>Well, if I'm not misreading this output from<TT> vmstat 1</TT>, I have a similar interrupt rate on my quad Phenom box:</P> <PRE> procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 32100 3506424 365440 2979380 0 0 1 10 1 0 11 2 87 0 0 0 32100 3505704 365440 2979384 0 0 0 0 2543 3229 5 1 94 0 1 0 32100 3504960 365440 2979388 0 0 0 0 2349 3042 15 2 83 0 1 0 32100 3481244 365440 2979388 0 0 0 164 2201 2963 28 2 68 1 0 0 32100 3517948 365440 2979388 0 0 0 144 2240 2933 14 2 84 0 </PRE> <P>I'm in the 2300 interrupts/sec category myself, and about 3000+ context switches. The interrupts seem evenly split between timer interrupts and "rescheduling" interrupts. I must admit ignorance: What are those? Here's what<TT> /proc/interrupts </TT>has to say:</P> <PRE> $ cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 0: 3041 118260 9853911 1682455038 IO-APIC-edge timer 1: 0 0 0 2 IO-APIC-edge i8042 4: 0 0 0 4 IO-APIC-edge 7: 1 0 0 0 IO-APIC-edge 8: 0 0 0 1 IO-APIC-edge rtc0 9: 0 0 0 0 IO-APIC-fasteoi acpi 14: 0 0 0 0 IO-APIC-edge pata_atiixp 15: 0 0 0 0 IO-APIC-edge pata_atiixp 16: 44415 49328 7067183 155730 IO-APIC-fasteoi hda_intel 17: 0 0 1753147 24 IO-APIC-fasteoi ehci_hcd:usb1, ehci_hcd:usb2, ehci_hcd:usb3, xhci_hcd:usb8, pata_jmicron, ahci 18: 1613 39448 341649 22745885 IO-APIC-fasteoi ohci_hcd:usb4, ohci_hcd:usb5, ohci_hcd:usb6, ohci_hcd:usb7, fglrx[0]@PCI:1:5:0 19: 1 3 0 60 IO-APIC-fasteoi hda_intel 22: 0 0 0 2 IO-APIC-fasteoi firewire_ohci 44: 100096614 0 0 98 PCI-MSI-edge eth0 45: 0 37256958 58 30995 PCI-MSI-edge ahci NMI: 0 0 0 0 Non-maskable interrupts LOC: 2068147993 2377844402 1668359324 239470048 Local timer interrupts SPU: 0 0 0 0 Spurious interrupts PMI: 0 0 0 0 Performance monitoring interrupts PND: 0 0 0 0 Performance pending work RES: 2555648191 2131761062 860328033 353027675 Rescheduling interrupts CAL: 6867 5608 6269 8570 Function call interrupts TLB: 24121576 19609582 18233777 16129012 TLB shootdowns TRM: 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 Threshold APIC interrupts MCE: 0 0 0 0 Machine check exceptions MCP: 29480 29480 29480 29480 Machine check polls ERR: 1 MIS: 0 </PRE> <P>At any rate, the kernel config <I>claims</I> HZ=100. I wonder what's causing this spastic interrupt rate. Firefox maybe? With eleventy billion tabs open, it never gets down to a CPU usage of 0. It always has <I>something</I> going on.</P> <P>In any case, 2300 wakeups / second isn't too unusual, unless my box also is unusual. (I'm willing to grant that...)</P> Wed, 04 Apr 2012 06:58:05 +0000 More than 2300 wakeup cycles per second https://lwn.net/Articles/490547/ https://lwn.net/Articles/490547/ pr1268 <p>For those curious (myself included), that's more than 2300 wakeup cycles <i>per second</i>. That's <b>a lot</b> of waking up! ;-)</p> Wed, 04 Apr 2012 06:33:45 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490546/ https://lwn.net/Articles/490546/ jzbiciak <div class="FormattedComment"> Thank you. I missed the use of 'cycles' there.<br> </div> Wed, 04 Apr 2012 06:30:15 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490545/ https://lwn.net/Articles/490545/ henrik <div class="FormattedComment"> Test cycles. From the start of the article:<br> "With two times 100 million wakeup cycles per day, a total of 73 billion cycles are recorded in a year's time."<br> </div> Wed, 04 Apr 2012 06:05:01 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490451/ https://lwn.net/Articles/490451/ jzbiciak <div class="FormattedComment"> That was my best guess, but I hate guessing. :-)<br> </div> Tue, 03 Apr 2012 17:49:31 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490443/ https://lwn.net/Articles/490443/ njs <div class="FormattedComment"> I assume that's test cycles, i.e., they measured the latency of 87.2 billion different wakeups?<br> </div> Tue, 03 Apr 2012 17:34:36 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490433/ https://lwn.net/Articles/490433/ jzbiciak <div class="FormattedComment"> I understand most of the data (and I think it looks awesome!). But, there's one piece I don't understand. Each of these charts has a label above it that says something like: "maximum latency 158 µs in a total of 87.2 billion cycles." I get the maximum latency part. What do they mean by "87.2 billion cycles"?<br> <p> On most of these CPUs, that'd be less than 2 minutes if they're measuring CPU cycles. That doesn't make any sense. Does anyone know the correct way to interpret that number?<br> </div> Tue, 03 Apr 2012 17:06:41 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490402/ https://lwn.net/Articles/490402/ slashdot <div class="FormattedComment"> The Athlon 64 is the only desktop x86 CPU among those and thus is most likely simply much faster than all the others.<br> <p> It would be nice to see Intel desktop CPUs and non-PREEMPT_RT kernels.<br> <p> </div> Tue, 03 Apr 2012 15:39:35 +0000 OSADL on realtime Linux determinism https://lwn.net/Articles/490398/ https://lwn.net/Articles/490398/ dsommers <div class="FormattedComment"> I looked at the results, and found it interesting that the AMD Athlon did so well. Until I noticed that the OS distributions and kernel bases are not the same. <br> <p> Top left: x86 (AMD Athlon 64 bit 2800+)<br> Distro: Fedora 14<br> Kernel: 3.0.9-rt25 #1 PREEMPT RT Sun Nov 13 15:59:59 CET 2011 x86_64 <br> <p> Top right: ARM (TI OMAP3517 @496 MHz)<br> Distro: Arago Project<br> Kernel: 2.6.33.7-rt29 #1 PREEMPT RT Mon Sep 27 09:54:08 CEST 2010 unknown <br> <p> Middle left: MIPS (ICT Loongson-2 64 bit @533 MHz)<br> Distro: RAYS baihong 2.0 GNU/Linux<br> Kernel: 2.6.33.7.2-rt30 #5 PREEMPT RT Thu Jan 27 16:51:24 CET 2011 unknown <br> <p> Middle right: ARM (i.MX35 @533 MHz, Phytec phyCORE-M)<br> Distro: *** PHYTEC BSP PD10.2.1 based on OSELAS(R) ***<br> Kernel: 2.6.33.7.2-rt30 #1 PREEMPT RT Wed Mar 16 17:14:46 CET 2011 unknown <br> <p> Bottom left: x86 (Intel Atom N270 @1600 MHz)<br> Distro: CentOS release 5.8 (Final)<br> Kernel: 2.6.33.14-rt31-atom #9 SMP PREEMPT RT Mon Jun 6 16:25:32 CEST 2011 i686 <br> <p> Bottom right: x86 (VIA C7 @1000 MHz)<br> Distro: Fedora 10<br> Kernel: 2.6.33.14-rt31 #8 PREEMPT RT Mon Jun 6 13:44:29 CEST 2011 i686 <br> <p> <p> These are important details, to avoid comparing apples and oranges. And I wonder how the result would change on the 2.6.33 based tests if they were upgraded to 3.0.9-rt25 as well. Especially since most of the 2.6.33 based tests are around 100-150µs, while the 3.0.9 are around 50-75µs. Is this caused by hardware platform or is it distro related or kernel version related? I hope the latter one, but this test doesn't reveal that at all.<br> <p> However, this does show that getting predictable latencies is possible in Linux with the PREEMPT RT patches - in general - no matter the hardware platform. It just doesn't say anything about the potential optimal performance between the hardware platforms.<br> <p> </div> Tue, 03 Apr 2012 15:30:25 +0000