<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.placenet.org/benoit/index.php/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Harvard Business School of Echec - libgtop</title>
  <link>http://www.placenet.org/benoit/index.php/</link>
  <description></description>
  <language>fr</language>
  <pubDate>Sat, 09 Aug 2008 08:26:39 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>ABI vs. API compatibility</title>
    <link>http://www.placenet.org/benoit/index.php/post/2008/04/22/ABI-vs-API-compatibility</link>
    <guid isPermaLink="false">urn:md5:e2c2591a8a58add53610f6031ffe1b7f</guid>
    <pubDate>Tue, 22 Apr 2008 08:39:00 +0200</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>gnome</category><category>libgtop</category><category>linux</category><category>memory</category>    
    <description>    &lt;h2&gt;glibtop_get_proc_mem&lt;/h2&gt;

&lt;p&gt;libgtop has a function &lt;code&gt;&lt;a href=&quot;http://svn.gnome.org/viewvc/libgtop/trunk/include/glibtop/procmem.h?view=markup&quot;&gt;glibtop_get_proc_mem&lt;/a&gt;&lt;/code&gt; to retrieve basic memory usage of a process. It fills a &lt;code&gt;struct glibtop_proc_mem&lt;/code&gt; which looks like:&lt;/p&gt;
&lt;pre&gt;
struct _glibtop_proc_mem
{
	guint64	flags;
	guint64 size;	
	guint64 vsize;
	guint64 resident;
	guint64 share;
	guint64 rss;
	guint64 rss_rlim;
};
&lt;/pre&gt;


&lt;p&gt;Yes, &lt;code&gt;size/vsize&lt;/code&gt; and &lt;code&gt;resident/rss&lt;/code&gt; look like duplicate. At least on the linux implementation, even if &lt;code&gt;size/vsize&lt;/code&gt; and &lt;code&gt;resident/rss&lt;/code&gt; come from &lt;code&gt;/proc/self/stat&lt;/code&gt; and &lt;code&gt;/proc/self/statm&lt;/code&gt;, you can see in &lt;code&gt;linux/fs/proc/{array,task_mmu}.c&lt;/code&gt; that they have the same values. So, it seems to me that the only unique members of &lt;code&gt;struct glibtop_proc_mem&lt;/code&gt; are &lt;code&gt;size&lt;/code&gt;, &lt;code&gt;resident&lt;/code&gt; and &lt;code&gt;share&lt;/code&gt; (ok there are also &lt;code&gt;flags&lt;/code&gt; which flags which members are filled and &lt;code&gt;rss_lim&lt;/code&gt;).&lt;/p&gt;


&lt;h2&gt;linux proportional set size&lt;/h2&gt;

&lt;p&gt;Linux 2.6.25 comes with a new stat in &lt;code&gt;/proc/self/smaps&lt;/code&gt; called &lt;code&gt;pss&lt;/code&gt; which is even smarter/accurate than &lt;code&gt;private_dirty&lt;/code&gt;. There's &lt;code&gt;glibtop_get_proc_map&lt;/code&gt; which currently have all the &lt;code&gt;smaps&lt;/code&gt; member but not this new &lt;code&gt;pss&lt;/code&gt;. So what is the smarter way to get this new &lt;code&gt;pss&lt;/code&gt; in libgtop without breaking everything ?&lt;/p&gt;

&lt;h3&gt;- break the ABI ?&lt;/h3&gt;

&lt;p&gt;I could simply extend &lt;code&gt;struct glibtop_proc_map&lt;/code&gt;. That would break the ABI, which i'm allowed to because libgtop is &lt;em&gt;desktop&lt;/em&gt;. But that's bad practice since packagers have to rebuild everything. That's a painful migration that may delay the adoption of newer versions of the library.&lt;/p&gt;

&lt;h3&gt;- break the API ?&lt;/h3&gt;

&lt;p&gt;What about cleaning up the &lt;code&gt;glibtop_proc_mem&lt;/code&gt; duplicate members, mark unused some of them and rename &lt;code&gt;rss&lt;/code&gt; to &lt;code&gt;pss&lt;/code&gt; while keeping it binary compatible ? That would make the API a bit more sensible. I've scanned the Debian/unstable archive and that would break the build 3-6 packages but i would be able to submit trivial patches to fix &lt;code&gt;glibtop_get_proc_mem&lt;/code&gt; usage. (And also add &lt;code&gt;glibtop_init();&lt;/code&gt; which are missing everywhere).&lt;/p&gt;

&lt;h3&gt;- hide &lt;code&gt;pss&lt;/code&gt; inside &lt;code&gt;rss&lt;/code&gt; ?&lt;/h3&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;So what's best ?&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Indiana patches</title>
    <link>http://www.placenet.org/benoit/index.php/post/2007/06/13/Indiana-patches</link>
    <guid isPermaLink="false">urn:md5:84db67a6ce2fc2e01e885f7fdb6fc7a1</guid>
    <pubDate>Wed, 13 Jun 2007 14:55:00 +0200</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>bug</category><category>gnome</category><category>libgtop</category><category>patch</category><category>SUN</category><category>system-monitor</category>    
    <description>    &lt;p&gt;Dear Sun Microsystems,
I think your &lt;a href=&quot;http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/&quot;&gt;patches&lt;/a&gt; are bullshit. Please drop them or &lt;a href=&quot;http://0pointer.de/blog/projects/project-indiana.html&quot;&gt;as already suggested, do fork&lt;/a&gt;.
&lt;br /&gt;
As the maintainer of system-monitor and libgtop, i have already rejected stupid patches from you. &lt;a href=&quot;http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/libgtop-01-solaris.diff&quot;&gt;They&lt;/a&gt; &lt;a href=&quot;http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/gnome-system-monitor-01-solaris.diff&quot;&gt;contain&lt;/a&gt; &lt;a href=&quot;http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/gnome-applets-03-make-multiload-network-available.diff&quot;&gt;unkown&lt;/a&gt; API changes and a lot of dead code. The &lt;a href=&quot;http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/libgtop-01-solaris.diff&quot;&gt;libgtop patch&lt;/a&gt; is the most scary. Here's a tip: libgtop code is OS specific (linux, bsd, solaris, etc have their own separate implementation) so copying linux code to solaris is obviously NOT going to work.
&lt;br /&gt;
I can see that some of your patches are actually OK, but your people don't seem to understand how we work.
&lt;br /&gt;
This reminds me of that private mail where you asked me to re-license libgtop to LGPL because you had some kind of packaging issues ... because you wanted to install libgtop in /foo/bar and instead of /foo/baz. Bad for you.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>signedness fun</title>
    <link>http://www.placenet.org/benoit/index.php/post/2007/02/12/signedness-fun</link>
    <guid isPermaLink="false">urn:md5:5a7547d9d8f0bad9520257b311c71cf8</guid>
    <pubDate>Mon, 12 Feb 2007 11:22:00 +0100</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>bug</category><category>gnome</category><category>libgtop</category><category>system-monitor</category>    
    <description>    &lt;p&gt;3 years ago, i deleted code that i didn't understand in libgtop. It was a mess about bitwise shift and xor.
Then came &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=406280&quot;&gt;these&lt;/a&gt; &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=406265&quot;&gt;bugs&lt;/a&gt; about system-monitor displaying 17179869184.0 GiB. This is about available disk space (you know, the 10% reservation for root, etc). On *BSD, available disk space can be negative... so you can get &lt;code&gt;df&lt;/code&gt; to reports negative capacity :&lt;/p&gt;

&lt;pre&gt;
$ df -h /
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s1a    496M    457M   -514K   100%    /
&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;(This reminds me of mfs fun with OpenBSD &lt;img src=&quot;/benoit/themes/default/smilies/wink.png&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/em&gt;&lt;/p&gt;


&lt;p&gt;libgtop uses statvfs/statfs functions to get disk space usage : &lt;code&gt;struct statvfs&lt;/code&gt; members' type is &lt;code&gt;fsblkcnt_t&lt;/code&gt; which is an unsigned integer. This means that some kernels store signed values as unsigned integers. Hence the old fun code i deleted. &lt;code&gt;glibtop_fsusage&lt;/code&gt; members are &lt;code&gt;guint64&lt;/code&gt; so there is not signedness mismatch between libgtop and the system.&lt;/p&gt;


&lt;p&gt;As I was unable to get negative values with linux 2.6.20 and ext3, I dig into &lt;code&gt;GNU df&lt;/code&gt; code and found the very same code that was in libgtop, i guess someone copy&amp;amp;pasted it into libgtop a long time ago. This code does funny things to handle integers with the top bit set as negative integers.&lt;/p&gt;


&lt;p&gt;I ended to this madness by ensuring available disk space is &amp;lt;= to free disk space.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>écrasement de pile dans libgtop &lt; 2.14.6</title>
    <link>http://www.placenet.org/benoit/index.php/post/2007/01/15/ecrasement-de-pile-dans-libgtop-2146</link>
    <guid isPermaLink="false">urn:md5:4952651f755c6ec6c36a065420f3e3d2</guid>
    <pubDate>Mon, 15 Jan 2007 00:50:00 +0100</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>gnome</category><category>libgtop</category>    
    <description>    &lt;p&gt;Enfin un &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=396477&quot;&gt;bug&lt;/a&gt; à me mettre sous la dent, histoire de changer de la soupe bugbuddy. Bon c'est pas très glorieux pour moi mais c'est du logiciel libre, et en moins de 24H, j'ai pris le problème en charge et fait tourner un nouveau &lt;a href=&quot;http://download.gnome.org/sources/libgtop/2.14/&quot;&gt;tarball 2.14.6&lt;/a&gt;. Il s'agissait d'un vilain écrasement de pile présent depuis toujours mais plus susceptible de se produire dans les vers &amp;gt; 2.6. Ça m'a un peu stressé mais je pense que j'ai bien corrigé le problème.&lt;/p&gt;


&lt;p&gt;J'ai transmis l'info à Loic Minier de Debian pour voir ce qu'il peut faire pour etch (le freeze est déjà en vigueur). Il a lancé tout une procédure pour gérer ça. Merci à lui.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Bugzilla tags</title>
    <link>http://www.placenet.org/benoit/index.php/post/2006/12/05/Bugzilla-tags</link>
    <guid isPermaLink="false">urn:md5:ee652f8dd00a741b942a10ba45066fca</guid>
    <pubDate>Tue, 05 Dec 2006 12:50:00 +0100</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>bug</category><category>gnome</category><category>libgtop</category>    
    <description>    &lt;p&gt;I've recently commited many patches that i forgot about. They were all in &amp;quot;Accepted Commit-Now&amp;quot; state but nobody spotted them. The new &lt;img src=&quot;http://bugzilla.gnome.org/images/emblems/P.png&quot; alt=&quot;patch symbol&quot; /&gt; is great to find bugs with patches but it doesn't help to find &amp;quot;Accepted Commit-Now&amp;quot; patches. There was for a long time a kFreeBSD patch for libgtop on bugzilla, i tagged it &amp;quot;Accepted Commit-Now&amp;quot; but it was never commited and i forgot about it. But last week, i got a new patch from Debian adding kFreeBSD support and commited it, then i found the old patch. What a waste of work :/&lt;/p&gt;


&lt;p&gt;I also often use the &lt;a href=&quot;http://bugzilla.gnome.org/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;long_desc_type=substring&amp;amp;long_desc=&amp;amp;status_whiteboard_type=allwordssubstr&amp;amp;status_whiteboard=&amp;amp;keywords_type=allwords&amp;amp;keywords=HELPWANTED&amp;amp;bug_status=UNCONFIRMED&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;bug_status=NEEDINFO&amp;amp;emailassigned_to1=1&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailassigned_to2=1&amp;amp;emailreporter2=1&amp;amp;emailqa_contact2=1&amp;amp;emailcc2=1&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0=&quot;&gt;HELPWANTED&lt;/a&gt; tag but without success. And there's a &lt;a href=&quot;http://live.gnome.org/GnomeLove&quot;&gt;GNOME love&lt;/a&gt; &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=325288&quot;&gt;bug&lt;/a&gt; for system-monitor &lt;img src=&quot;/benoit/themes/default/smilies/smile.png&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>libgtop 2.14.5</title>
    <link>http://www.placenet.org/benoit/index.php/post/2006/12/03/libgtop-2145</link>
    <guid isPermaLink="false">urn:md5:bc7a6ff7628f3813762654d2cb59830d</guid>
    <pubDate>Sun, 03 Dec 2006 19:26:00 +0100</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>gnome</category><category>libgtop</category>    
    <description>    &lt;p&gt;What's new in libgtop 2.14.5 :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added kfreebsd support (Petr Salinger).&lt;/li&gt;
&lt;li&gt;Added solaris glibtop_get_proc_open_files (Henry Zhang).&lt;/li&gt;
&lt;li&gt;Migrated to gtk-doc (Germán Poó-Caamaño).&lt;/li&gt;
&lt;li&gt;glibtop_get_mountlist can now ignore nsfd FS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks everyone.&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>