<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
>

  <channel rdf:about="http://lwn.net/headlines/300992/">
    <title>LWN: Comments on "Low-level tracing plumbing"</title>
    <link>http://lwn.net/Articles/300992/</link>
    <description>
This is a special feed containing comments posted
to the individual LWN article titled &quot;Low-level tracing plumbing&quot;.

    </description>

    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>2</syn:updateFrequency>
    <items>
      <rdf:Seq>
	<rdf:li resource="http://lwn.net/Articles/302651/rss" />
	<rdf:li resource="http://lwn.net/Articles/301840/rss" />
	<rdf:li resource="http://lwn.net/Articles/301761/rss" />
	<rdf:li resource="http://lwn.net/Articles/301760/rss" />
	<rdf:li resource="http://lwn.net/Articles/301715/rss" />
	<rdf:li resource="http://lwn.net/Articles/301602/rss" />
	<rdf:li resource="http://lwn.net/Articles/301581/rss" />
	<rdf:li resource="http://lwn.net/Articles/301575/rss" />
	<rdf:li resource="http://lwn.net/Articles/301518/rss" />
	<rdf:li resource="http://lwn.net/Articles/301436/rss" />
	<rdf:li resource="http://lwn.net/Articles/301399/rss" />
	<rdf:li resource="http://lwn.net/Articles/301396/rss" />
	<rdf:li resource="http://lwn.net/Articles/301391/rss" />
      
      </rdf:Seq>
    </items>

  </channel>
    <item rdf:about="http://lwn.net/Articles/302651/rss">
      <title>Right-shifted</title>
      <link>http://lwn.net/Articles/302651/rss</link>
      <dc:date>2008-10-10T20:46:07+00:00</dc:date>
      <dc:creator>sethml</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
It depends on what the meaning of &quot;is&quot; is.  :)&lt;br&gt;
&lt;p&gt;
Something like &quot;the len field contains the length with the two lowest bits lopped off&quot; would &lt;br&gt;
be clearer.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301840/rss">
      <title>Re: the side note</title>
      <link>http://lwn.net/Articles/301840/rss</link>
      <dc:date>2008-10-05T20:48:58+00:00</dc:date>
      <dc:creator>dw</dc:creator>
      <description>
      Turns out there are good reasons not to go with C99 stdint types in the kernel (namespace issues). Thread starting &lt;a href=&quot;http://infocenter.guardiandigital.com/archive/linux-kernel/2004/Dec/0015.html&quot;&gt;here&lt;/a&gt;.
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301761/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301761/rss</link>
      <dc:date>2008-10-03T23:43:29+00:00</dc:date>
      <dc:creator>fuhchee</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; It could still be kernel code doing the unpacking, just not at trace-time.&lt;/font&gt;&lt;br&gt;
&lt;p&gt;
If the kernel isn't going to host huge history buffers, then&lt;br&gt;
conversions will in general have to be done essentially online,&lt;br&gt;
probably deferred only a bit.&lt;br&gt;
&lt;p&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301760/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301760/rss</link>
      <dc:date>2008-10-03T23:31:35+00:00</dc:date>
      <dc:creator>tbird20d</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
It could still be kernel code doing the unpacking, just not at trace-time.  This preserves the ability to use cat &amp;amp; grep, while still omitting the unpacking overhead during trace itself.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301715/rss">
      <title>Right-shifted</title>
      <link>http://lwn.net/Articles/301715/rss</link>
      <dc:date>2008-10-03T18:53:45+00:00</dc:date>
      <dc:creator>ndk</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
Yep, I misread what you wrote.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301602/rss">
      <title>Right-shifted</title>
      <link>http://lwn.net/Articles/301602/rss</link>
      <dc:date>2008-10-03T04:00:00+00:00</dc:date>
      <dc:creator>corbet</dc:creator>
      <description>
      In fact, the value stored in &lt;tt&gt;len&lt;/tt&gt; has indeed been right-shifted by two bits.  It needs to be left-shifted to be interpreted.  Apologies if I wrote it in a way that was less than entirely clear, but I believe it was correct.
      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301581/rss">
      <title>Low-level tracing plumbing</title>
      <link>http://lwn.net/Articles/301581/rss</link>
      <dc:date>2008-10-02T22:12:59+00:00</dc:date>
      <dc:creator>ndk</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; a length given by the len field, which is right-shifted by two bits&lt;/font&gt;&lt;br&gt;
&lt;p&gt;
should read &quot;left-shifted&quot;.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301575/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301575/rss</link>
      <dc:date>2008-10-02T21:51:36+00:00</dc:date>
      <dc:creator>fuhchee</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; Not only that, but it'll possibly be just the packing. Unpacking and &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; collating data can be done in userspace, and possibly offline after enough &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; trace data's been collected.&lt;/font&gt;&lt;br&gt;
&lt;p&gt;
OTOH, Linus wanted to people to be able to use this tracing stuff with&lt;br&gt;
just a cat/grep, which seems to eschew *requiring* special userspace tools&lt;br&gt;
for unpacking.&lt;br&gt;
&lt;p&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301518/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301518/rss</link>
      <dc:date>2008-10-02T17:01:33+00:00</dc:date>
      <dc:creator>Oddscurity</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
Not only that, but it'll possibly be just the packing. Unpacking and collating data can be done in userspace, and possibly offline after enough trace data's been collected.&lt;br&gt;
&lt;p&gt;
Having dense fields like this also means a lot more of these will fit in cache.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301436/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301436/rss</link>
      <dc:date>2008-10-02T09:35:29+00:00</dc:date>
      <dc:creator>xav</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
Nowadays, optimizing for size is what counts the most. The few cycles you spend at packing and unpacking data (or recomputing it in some cases) are well repaid by the huge number of cycles waiting for the memory controller you gained.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301399/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301399/rss</link>
      <dc:date>2008-10-02T03:51:19+00:00</dc:date>
      <dc:creator>mbligh</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; It seems to me that the struct is better optimised for size than it is &lt;/font&gt;&lt;br&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; performance. &lt;/font&gt;&lt;br&gt;
&lt;p&gt;
Yes. We want to pack as much data into the buffer as possible&lt;br&gt;
&lt;p&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; struct { uint32_t; uint32_t; uint32_t; }&lt;/font&gt;&lt;br&gt;
&lt;p&gt;
That takes 3 times as much space! You're roughly having the amount of useful&lt;br&gt;
data we can store in the trace buffer.&lt;br&gt;
&lt;p&gt;
&lt;font class=&quot;QuotedText&quot;&gt;&amp;gt; struct { uint8_t; uint8_t; uint16_t; }&lt;/font&gt;&lt;br&gt;
&lt;p&gt;
That doesn't leave enough space for the time counter. It's TSC stamping at roughly 2-4GHz, and we need accurate resolution to merge the per-cpu buffers back together. We don't want to log extended timestamp events (whenever your time counter rolls over) too often.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301396/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301396/rss</link>
      <dc:date>2008-10-02T02:52:07+00:00</dc:date>
      <dc:creator>felixfix</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
I'd guess it's better to have more events or to use less memory for the same number of events.  The few cycles spent twiddling bits are a much better bargain than eating up memory, and will pay for themselves in reduced memory impact anyway.  I have written (long long ago) similar traces and my primary goal was ALWAYS as many trace events as possible.&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
    <item rdf:about="http://lwn.net/Articles/301391/rss">
      <title>I'm no hardware nut, but..</title>
      <link>http://lwn.net/Articles/301391/rss</link>
      <dc:date>2008-10-02T01:45:08+00:00</dc:date>
      <dc:creator>dw</dc:creator>
      <description>
      &lt;div class=&quot;FormattedComment&quot;&gt;
It seems to me that the struct is better optimised for size than it is performance. Can gcc really generate speedy code for those kinds of odd shaped bitfields?&lt;br&gt;
&lt;p&gt;
I'd have thought either of these would be faster:&lt;br&gt;
&lt;p&gt;
struct { uint32_t; uint32_t; uint32_t; }&lt;br&gt;
struct { uint8_t; uint8_t; uint16_t; }&lt;br&gt;
&lt;p&gt;
Side note: has there been any discussion of moving the kernel to the use of C99 fixed-width integer types? It's only been almost a decade. Having worked on a C99 project for a while, the in-kernel type names now look pesky. :)&lt;br&gt;
&lt;p&gt;
Looking at (unoptimised Apple) gcc 4 output makes me think the struct from the article may not be so optimal.. &lt;a href=&quot;http://pastebin.com/f33132559&quot;&gt;http://pastebin.com/f33132559&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;

      
      </description>
    </item>
</rdf:RDF>

