<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>my tech blog &#187; oddities</title>
	<atom:link href="http://billauer.se/blog/category/oddities/feed/" rel="self" type="application/rss+xml" />
	<link>https://billauer.se/blog</link>
	<description>Anything I found worthy to write down.</description>
	<lastBuildDate>Thu, 12 Mar 2026 11:36:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>A ghost process eating up all RAM?</title>
		<link>https://billauer.se/blog/2013/10/high-memory-use-meminfo-slab/</link>
		<comments>https://billauer.se/blog/2013/10/high-memory-use-meminfo-slab/#comments</comments>
		<pubDate>Sun, 27 Oct 2013 17:31:15 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[oddities]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=3880</guid>
		<description><![CDATA[After a &#8220;find&#8221; operation spanning the entire disk, I suddenly had System Monitor (2.28.0 of Fedora 12) telling me that 11.5 GB out of the existing 16 GB were used up, and the applet said 75% was &#8220;in use by programs&#8221;. Really. Virtually nothing was running on the system. Just to be sure, I tried [...]]]></description>
			<content:encoded><![CDATA[<p>After a &#8220;find&#8221; operation spanning the entire disk, I suddenly had System Monitor (2.28.0 of Fedora 12) telling me that 11.5 GB out of the existing 16 GB were used up, and the applet said 75% was &#8220;in use by programs&#8221;. Really. Virtually nothing was running on the system.</p>
<p>Just to be sure, I tried out</p>
<pre>$ ps aux --sort -rss | less</pre>
<p>(list processes sorted by resident memory) and as expected, no memory hog to be seen.</p>
<p>So what does the kernel (a home cooked 2.6.35.4) say for itself?</p>
<pre>$ cat /proc/meminfo
MemTotal:       16463436 kB
MemFree:          130568 kB
Buffers:         2818532 kB
Cached:          1387344 kB
SwapCached:            0 kB
Active:          3368176 kB
Inactive:        2246912 kB
Active(anon):    1407872 kB
Inactive(anon):   339276 kB
Active(file):    1960304 kB
Inactive(file):  1907636 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               368 kB
Writeback:             0 kB
AnonPages:       1409264 kB
Mapped:           174032 kB
Shmem:            337932 kB
<span style="color: #ff0000;"><strong>Slab:           10246976 kB</strong></span>
<span style="color: #ff0000;"><strong>SReclaimable:    9526744 kB</strong></span>
SUnreclaim:       720232 kB
KernelStack:        5112 kB
PageTables:        47880 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     8231716 kB
Committed_AS:    4241756 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      122564 kB
VmallocChunk:   34359572612 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      350080 kB
DirectMap2M:    16422912 kB</pre>
<p>Hmmm&#8230; That&#8217;s the kernel eating up ~10 GB, most of which is reclaimable. <a href="http://linux-mm.org/Drop_Caches" target="_blank">This page</a> seems to explain the issue: As the disk was scanned, directory and inode metadata was probably cached. So what if that takes nearly 10 GB?</p>
<p>The thing is that it gives a somewhat misleading picture of the computer&#8217;s state.</p>
<p>So let&#8217;s just tell the kernel to drop all those caches, as suggested in that page:</p>
<p>As root, just go</p>
<pre># echo 3 &gt; /proc/sys/vm/drop_caches</pre>
<p>and watch how the memory meter drops. This problem is supposed to be solved in kernel not as ancient as mine.</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2013/10/high-memory-use-meminfo-slab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ionice. Only that made upgrading worth it.</title>
		<link>https://billauer.se/blog/2010/01/ionice-only-that-made-upgrading-worth-it/</link>
		<comments>https://billauer.se/blog/2010/01/ionice-only-that-made-upgrading-worth-it/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 23:16:16 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[oddities]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=447</guid>
		<description><![CDATA[Copying gigabytes of disk can get the system sluggish. On Linux, the solution is so simple. If process 18898 happens to take control of your disk, just go: ionice -c 3 -p 18898 And you have your computer back. &#8220;-c 3&#8243; means class 3, which is idle class. In other words, take the disk when [...]]]></description>
			<content:encoded><![CDATA[<p>Copying gigabytes of disk can get the system sluggish. On Linux, the solution is so simple. If process 18898 happens to take control of your disk, just go:</p>
<pre>ionice -c 3 -p 18898</pre>
<p>And you have your computer back. &#8220;-c 3&#8243; means class 3, which is idle class. In other words, take the disk when nobody else asks for it.</p>
<p>I love it. More <a href="http://friedcpu.wordpress.com/2007/07/17/why-arent-you-using-ionice-yet/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2010/01/ionice-only-that-made-upgrading-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing .so libraries on a 64-bit Fedora with yum</title>
		<link>https://billauer.se/blog/2010/01/installing-so-libraries-on-a-64-bit-fedora-with-yum/</link>
		<comments>https://billauer.se/blog/2010/01/installing-so-libraries-on-a-64-bit-fedora-with-yum/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 22:41:11 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[oddities]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=436</guid>
		<description><![CDATA[A short note about installing libraries on an Intel 64 bit machine (Fedora 12 in my case). It all starts with a short conversation like this one: [root@short Downloads]# rpm -i VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64.rpm error: Failed dependencies:     libQtGui.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64     libQtOpenGL.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64 THE WRONG THING TO DO IS: [root@short Downloads]# [...]]]></description>
			<content:encoded><![CDATA[<p>A short note about installing libraries on an Intel 64 bit machine (Fedora 12 in my case).</p>
<p>It all starts with a short conversation like this one:</p>
<pre>[root@short Downloads]# rpm -i VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64.rpm
error: Failed dependencies:
    libQtGui.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64
    libQtOpenGL.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64</pre>
<p>THE <span style="color: #ff0000;"><strong>WRONG</strong></span> THING TO DO IS:</p>
<pre>[root@short Downloads]# yum install libQtGui.so.4</pre>
<p>because it will install the right library, but for 32 bit (note the i686 suffix). There must be an elegant way to come around this. Until I find it out, I&#8217;ll go:</p>
<pre>[root@short Downloads]# yum whatprovides libQtGui.so.4
Loaded plugins: presto, refresh-packagekit
1:qt-x11-4.5.3-7.fc12.i686 : Qt GUI-related libraries
Repo        : fedora
Matched from:
Other       : libQtGui.so.4</pre>
<p>(this entry possibly duplicated for each repository)</p>
<p>Now we have the name of the 32-bit package, qt-x11-4.5.3-7.fc12.i686 in our case. Just replace i686 with x86_64, and off we go:</p>
<pre>[root@short Downloads]# yum install qt-x11-4.5.3-9.fc12.<span style="color: #ff0000;">x86_64</span></pre>
<p>It is left as an exercise to explain why yum would load i686 files when running on a x86_64 machine. Tell me if you get the logic.</p>
<p>Another thing is that one can match against file names:</p>
<pre>[root@short eli]# yum whatprovides "*libXm.so.*"
Loaded plugins: presto, refresh-packagekit
lesstif-0.95.2-1.fc12.i686 : OSF/Motif library clone
Repo        : fedora
Matched from:
Filename    : /usr/lib/libXm.so.2
Filename    : /usr/lib/libXm.so.2.0.1
Other       : libXm.so.2</pre>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2010/01/installing-so-libraries-on-a-64-bit-fedora-with-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DCM loses lock on Virtex-4: It&#8217;s all about auto calibration</title>
		<link>https://billauer.se/blog/2009/10/dcm-loses-lock-virtex4-autocalibration-21435/</link>
		<comments>https://billauer.se/blog/2009/10/dcm-loses-lock-virtex4-autocalibration-21435/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 17:37:45 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[FPGA]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[oddities]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=371</guid>
		<description><![CDATA[The whole story began when I decided to be kind enough to tell the Xilinx tools (ISE 9.2 in my case) that the Virtex-4 I&#8217;m targeting is a grown-up. Stepping 2, to be precise. I added CONFIG STEPPING = "2"; to the UCF file. It must have been one of those moments where I believed [...]]]></description>
			<content:encoded><![CDATA[<p>The whole story began when I decided to be kind enough to tell the Xilinx tools (ISE 9.2 in my case) that the Virtex-4 I&#8217;m targeting is a grown-up. Stepping 2, to be precise. I added</p>
<pre>CONFIG STEPPING = "2";</pre>
<p>to the UCF file. It must have been one of those moments where I believed that the tools do what is best for me.</p>
<p>It wasn&#8217;t long before the mapper told me it&#8217;s rewarding me with some autocalibration logic for the DCM. Sounded pretty OK. Some logic that will get the DCM back on its feet if the clock stops and returns. Not that I have any such plans. As a matter of fact, I&#8217;ve made sure that the DCM will get a reset after any possible messing with the DCM&#8217;s clock input.</p>
<p>Both the mapping warning and the docs mention that it&#8217;s possible to disable the autocalibration feature in order to save some logic. They never mentioned that the logic can kill the DCM.</p>
<p>And then one of the DCMs started losing lock. I had changed several other things at the same time, so it wasn&#8217;t easy to track down why. But it looked so weird: The DCM&#8217;s lock flag would go high, and then go down again. The timescale was tens of milliseconds, which is way beyond the response times  for a DCM.</p>
<p>My first thought was that it must have something to do with the clock&#8217;s signal quality. Maybe some crosstalk. The clock was around 200 MHz. But then I decided to look a bit closer on what this autocalibration was about.</p>
<p>That led me to <a href="http://www.xilinx.com/support/answers/21435.htm" target="_blank">Answer Record #21435</a>, which was pretty explicit about the reset:</p>
<blockquote><p>When the input clock returns, the user must manually assert the DCM reset for at least 200 ms to resume proper DCM functionality.</p></blockquote>
<p>200 ms? So there is was. I did mess with the input clock, but then I sent a brief reset signal to the DCM to get it back to normal. It worked in the past. Not with the extra logic. So all I needed to do, was to add</p>
<p>defparam   thedcm.DCM_AUTOCALIBRATION = &#8220;FALSE&#8221;;</p>
<p>(in the Verilog definition of the DCM) and the problem (which shouldn&#8217;t have occured in the first place) was solved.</p>
<p>To make things slightly more annoying, I also had to upgrade the old &#8220;DCM&#8221; primitives to &#8220;DCM_BASE&#8221;, because when the &#8220;DCM&#8221; primitives are upgraded automatically to DCM_ADV&#8217;s (by XST),  the DCM_AUTOCALIBRATION parameter set to the default, which is &#8220;TRUE&#8221;. The same parameter simply doesn&#8217;t exist for the backward-compatible &#8220;DCM&#8221; primitive.</p>
<p>Note to self: Remember to disable the autocalibration on all DCMs from now on.</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2009/10/dcm-loses-lock-virtex4-autocalibration-21435/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>500 days: The uptime never reached</title>
		<link>https://billauer.se/blog/2009/09/linux-kernel-uptime-jiffies-wrap-497-days/</link>
		<comments>https://billauer.se/blog/2009/09/linux-kernel-uptime-jiffies-wrap-497-days/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 11:28:36 +0000</pubDate>
		<dc:creator>eli</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[oddities]]></category>

		<guid isPermaLink="false">https://billauer.se/blog/?p=357</guid>
		<description><![CDATA[I know it&#8217;s stupid, but there&#8217;s something cool about very long uptimes. I think it begins when the uptime reaches 100 days: You think twice before rebooting your Linux machine: Is it really necessary? The truth is that without really paying attention to it, my Linux box approached 500 days. I noticed that, because I [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s stupid, but there&#8217;s something cool about very long uptimes. I think it begins when the uptime reaches 100 days: You think twice before rebooting your Linux machine: Is it really necessary?</p>
<p>The truth is that without really paying attention to it, my Linux box approached 500 days. I noticed that, because I wanted to upgrade my kernel (it&#8217;s about time&#8230;). But first I wanted to know what I&#8217;m breaking. 493 days, uptime told me. So I decided to wait a week. Childish, but it&#8217;s 500 days after all.</p>
<p>Today is the day. My computer has been up for 500 days. Here comes the celebration:</p>
<pre>[eli@localhost eli]$ uptime
  1:51pm  up 3 days, 10:01,  4 users,  load average: 0.21, 0.05, 0.01</pre>
<p>Oops. That&#8217;s not 500 days! And I&#8217;m sure that the computer hasn&#8217;t rebooted. Conclusion: My uptime counter has wrapped to zero.</p>
<p>Let&#8217;s get to the root of this:</p>
<pre>[eli@localhost eli]$ cat /proc/uptime
295330.71 41278547.60</pre>
<p>The left number is the uptime, in seconds.  To the right is the idle time, in seconds as well.</p>
<p>It just so happens that the kernel counts the uptime in jiffies, which is 1/100 of a second. Since my computer is a 32-bit Intel, the counter can only count 2^32 jiffies, which is 42949672.96 seconds, which happens to be 497.1 days (divide by 60, 60 again, and then 24). After that, the counter starts over from zero. What a nasty trick&#8230;</p>
<p>And since we&#8217;re at it, why not check up the idle time? 41278547.60 seconds is 477.76 days, which tells something about how much I use my computer. In fact, it&#8217;s more like a housekeeping server (mail, routing and stuff), so no wonder it&#8217;s idle most of the time. A quick calculation shows that it was active no more than 4.5% of its 500 days of uptime. Hmmm&#8230;</p>
<p>Anyhow, I&#8217;m sure that whoever wrote the uptime counter had a little laught about idiots like me who think it&#8217;s cool to see the uptime reach 500 days. Don&#8217;t count the jiffies, he must have said, make the jiffies count.</p>
]]></content:encoded>
			<wfw:commentRss>https://billauer.se/blog/2009/09/linux-kernel-uptime-jiffies-wrap-497-days/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
