<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-6562</id>
	<title>Nabble - freebsd-arch</title>
	<updated>2009-12-16T10:19:45Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/freebsd-arch-f6562.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/freebsd-arch-f6562.html" />
	<subtitle type="html">Discussion related to FreeBSD architecture</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26815897</id>
	<title>Re: network statistics in SMP</title>
	<published>2009-12-16T10:19:45Z</published>
	<updated>2009-12-16T10:19:45Z</updated>
	<author>
		<name>Bruce Evans-4</name>
	</author>
	<content type="html">On Tue, 15 Dec 2009, John Baldwin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tuesday 15 December 2009 12:45:13 pm Harti Brandt wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Tue, 15 Dec 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;On Tuesday 15 December 2009 4:38:04 am Harti Brandt wrote:
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; I'm working on our network statistics (in the context of SNMP) and wonder,
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; to what extend we want them to be correct. I've re-read part of the past
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; discussions about 64-bit counters on 32-bit archs and got the impression,
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; that there are users that would like to have almost correct statistics
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; (for accounting, for example). If this is the case I wonder whether the
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; way we do the statistics today is correct.
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; Basically all statistics are incremented or added to simply by a += b oder
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; a++. As I understand, this worked fine in the old days, where you had
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; spl*() calls at the right places. Nowadays when everything is SMP
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; shouldn't we use at least atomic operations for this? Also I read that on
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; architectures where cache coherency is not implemented in hardware even
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; this does not help (I found a mail from jhb why for the mutex
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; implementation this is not a problem, but I don't understand what to do
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; for the += and ++ operations). I failed to find a way, though, to
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; influence the caching policy (is there a function one can call to
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;&amp;gt; change the policy?).
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;Atomic ops will always work for reliable statistics. &amp;nbsp;However, I believe
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;Robert is working on using per-CPU statistics for TCP, UDP, etc. similar to
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;what we do now for many of the 'cnt' stats (context switches, etc.). &amp;nbsp;For
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;'cnt' each CPU has its own count of stats that are updated using non-atomic
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;ops (since they are CPU local). &amp;nbsp;sysctl handlers then sum up the various per-
&lt;br&gt;&amp;gt;&amp;gt; JB&amp;gt;CPU counts to report global counts to userland.
&lt;/div&gt;&lt;br&gt;I don't like the bloat from this, but don't see anything better. &amp;nbsp;Julian
&lt;br&gt;said in another reply that there are even more complications for VIMAGE.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; I see. I was also thinking along these lines, but was not sure whether it
&lt;br&gt;&amp;gt;&amp;gt; is worth the trouble. I suppose this does not help to implement 64-bit
&lt;br&gt;&amp;gt;&amp;gt; counters on 32-bit architectures, though, because you cannot read them
&lt;br&gt;&amp;gt;&amp;gt; reliably without locking to sum them up, right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Either that or you just accept that you have a small race since it is only stats. :)
&lt;br&gt;&lt;br&gt;Actually, you can do better with a generation count. &amp;nbsp;The generation count
&lt;br&gt;would at least tell you if you lost a race. &amp;nbsp;The generation count should
&lt;br&gt;only be maintained while summing other counts, since it must be global and
&lt;br&gt;incremented by atomic ops (to avoid the races without even more costly
&lt;br&gt;locking which would make the generation count irrelevant) so maintaining
&lt;br&gt;it all the time would more than defeat the point of having per-CPU counters
&lt;br&gt;(all CPUs would compete for it at the same address). &amp;nbsp;Probably not worth
&lt;br&gt;it for statistics. &amp;nbsp;Except, if userland had control over it, then userland
&lt;br&gt;could decide the policy.
&lt;br&gt;&lt;br&gt;Actually2, this solves your original problem!, provided the races are
&lt;br&gt;so rarely lost that looping to recover from them works: Once counters
&lt;br&gt;are per-CPU, they can be 64-bits with no complications until they are
&lt;br&gt;summed. &amp;nbsp;Detection of lost races is essential for summing them on
&lt;br&gt;32-bit systems, unlike for 32-bit counters, since a lost race at the
&lt;br&gt;point where the low 32 bits wraps around may give an error of 2**32
&lt;br&gt;in the sum, while a lost race for a 32-bit counter only makes the sum
&lt;br&gt;a bit too small (unless the 32-bit counter wrapped).
&lt;br&gt;&lt;br&gt;Simple version:
&lt;br&gt;- bloat PCPU_INC(var) to do something like the following:
&lt;br&gt;&amp;nbsp;	if (PCPU_GET(counter_summing_mode))
&lt;br&gt;&amp;nbsp;		atomic_add_int(&amp;counter_gen, 1);
&lt;br&gt;&amp;nbsp;	OLD_PCPU_INC(var);
&lt;br&gt;- set PCPU_GET(counter_summing_mode) while summing. &amp;nbsp;Needs heavyweight
&lt;br&gt;&amp;nbsp; &amp;nbsp;synchronization (IPIs?) to set and clear the flag on other CPUs. &amp;nbsp;Must
&lt;br&gt;&amp;nbsp; &amp;nbsp;also make all other CPUs flush pending writes (so that a 64-bit counter
&lt;br&gt;&amp;nbsp; &amp;nbsp;cannot be half-written at the beginning of the summing), but this will
&lt;br&gt;&amp;nbsp; &amp;nbsp;happen automatically with any heavyweight synchronization.
&lt;br&gt;&lt;br&gt;Unsimple versions: to avoid bloating PCPU_INC(), write-protect all
&lt;br&gt;counters while summing, and count generations in the trap handler ...
&lt;br&gt;&lt;br&gt;However, I prefer summing 32-bit counters (with heuristics to detect
&lt;br&gt;wraparound) to a 64-bit sum, like I think you already do for SNMP.
&lt;br&gt;&lt;br&gt;Wraparound heuristics may still be useful with the generation count:
&lt;br&gt;suppose the generation count increases faster than you can sum; then
&lt;br&gt;looping to get a coherent sum doesn't work, and wraparound must be
&lt;br&gt;ruled out or fixed up in another way; the 32-bit wraparound heuristic
&lt;br&gt;works perfectly since we can guarantee to sum faster than a 32-bit
&lt;br&gt;counter can wrap twice.
&lt;br&gt;&lt;br&gt;Bruce
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26815897&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26815897&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26815897.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26800518</id>
	<title>Re: network statistics in SMP</title>
	<published>2009-12-15T10:13:28Z</published>
	<updated>2009-12-15T10:13:28Z</updated>
	<author>
		<name>jhb-3</name>
	</author>
	<content type="html">On Tuesday 15 December 2009 12:45:13 pm Harti Brandt wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, 15 Dec 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; JB&amp;gt;On Tuesday 15 December 2009 4:38:04 am Harti Brandt wrote:
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; I'm working on our network statistics (in the context of SNMP) and wonder, 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; to what extend we want them to be correct. I've re-read part of the past 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; discussions about 64-bit counters on 32-bit archs and got the impression, 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; that there are users that would like to have almost correct statistics 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; (for accounting, for example). If this is the case I wonder whether the 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; way we do the statistics today is correct.
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; Basically all statistics are incremented or added to simply by a += b oder 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; a++. As I understand, this worked fine in the old days, where you had 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; spl*() calls at the right places. Nowadays when everything is SMP 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; shouldn't we use at least atomic operations for this? Also I read that on 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; architectures where cache coherency is not implemented in hardware even 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; this does not help (I found a mail from jhb why for the mutex 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; implementation this is not a problem, but I don't understand what to do 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; for the += and ++ operations). I failed to find a way, though, to 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; influence the caching policy (is there a function one can call to 
&lt;br&gt;&amp;gt; JB&amp;gt;&amp;gt; change the policy?).
&lt;br&gt;&amp;gt; JB&amp;gt;
&lt;br&gt;&amp;gt; JB&amp;gt;Atomic ops will always work for reliable statistics. &amp;nbsp;However, I believe 
&lt;br&gt;&amp;gt; JB&amp;gt;Robert is working on using per-CPU statistics for TCP, UDP, etc. similar to 
&lt;br&gt;&amp;gt; JB&amp;gt;what we do now for many of the 'cnt' stats (context switches, etc.). &amp;nbsp;For 
&lt;br&gt;&amp;gt; JB&amp;gt;'cnt' each CPU has its own count of stats that are updated using non-atomic 
&lt;br&gt;&amp;gt; JB&amp;gt;ops (since they are CPU local). &amp;nbsp;sysctl handlers then sum up the various per-
&lt;br&gt;&amp;gt; JB&amp;gt;CPU counts to report global counts to userland.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I see. I was also thinking along these lines, but was not sure whether it 
&lt;br&gt;&amp;gt; is worth the trouble. I suppose this does not help to implement 64-bit 
&lt;br&gt;&amp;gt; counters on 32-bit architectures, though, because you cannot read them 
&lt;br&gt;&amp;gt; reliably without locking to sum them up, right?
&lt;/div&gt;&lt;br&gt;Either that or you just accept that you have a small race since it is only stats. :)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Baldwin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26800518&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26800518&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26800518.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26798762</id>
	<title>Re: network statistics in SMP</title>
	<published>2009-12-15T09:45:13Z</published>
	<updated>2009-12-15T09:45:13Z</updated>
	<author>
		<name>Harti Brandt</name>
	</author>
	<content type="html">On Tue, 15 Dec 2009, John Baldwin wrote:
&lt;br&gt;&lt;br&gt;JB&amp;gt;On Tuesday 15 December 2009 4:38:04 am Harti Brandt wrote:
&lt;br&gt;JB&amp;gt;&amp;gt; Hi all,
&lt;br&gt;JB&amp;gt;&amp;gt; 
&lt;br&gt;JB&amp;gt;&amp;gt; I'm working on our network statistics (in the context of SNMP) and wonder, 
&lt;br&gt;JB&amp;gt;&amp;gt; to what extend we want them to be correct. I've re-read part of the past 
&lt;br&gt;JB&amp;gt;&amp;gt; discussions about 64-bit counters on 32-bit archs and got the impression, 
&lt;br&gt;JB&amp;gt;&amp;gt; that there are users that would like to have almost correct statistics 
&lt;br&gt;JB&amp;gt;&amp;gt; (for accounting, for example). If this is the case I wonder whether the 
&lt;br&gt;JB&amp;gt;&amp;gt; way we do the statistics today is correct.
&lt;br&gt;JB&amp;gt;&amp;gt; 
&lt;br&gt;JB&amp;gt;&amp;gt; Basically all statistics are incremented or added to simply by a += b oder 
&lt;br&gt;JB&amp;gt;&amp;gt; a++. As I understand, this worked fine in the old days, where you had 
&lt;br&gt;JB&amp;gt;&amp;gt; spl*() calls at the right places. Nowadays when everything is SMP 
&lt;br&gt;JB&amp;gt;&amp;gt; shouldn't we use at least atomic operations for this? Also I read that on 
&lt;br&gt;JB&amp;gt;&amp;gt; architectures where cache coherency is not implemented in hardware even 
&lt;br&gt;JB&amp;gt;&amp;gt; this does not help (I found a mail from jhb why for the mutex 
&lt;br&gt;JB&amp;gt;&amp;gt; implementation this is not a problem, but I don't understand what to do 
&lt;br&gt;JB&amp;gt;&amp;gt; for the += and ++ operations). I failed to find a way, though, to 
&lt;br&gt;JB&amp;gt;&amp;gt; influence the caching policy (is there a function one can call to 
&lt;br&gt;JB&amp;gt;&amp;gt; change the policy?).
&lt;br&gt;JB&amp;gt;
&lt;br&gt;JB&amp;gt;Atomic ops will always work for reliable statistics. &amp;nbsp;However, I believe 
&lt;br&gt;JB&amp;gt;Robert is working on using per-CPU statistics for TCP, UDP, etc. similar to 
&lt;br&gt;JB&amp;gt;what we do now for many of the 'cnt' stats (context switches, etc.). &amp;nbsp;For 
&lt;br&gt;JB&amp;gt;'cnt' each CPU has its own count of stats that are updated using non-atomic 
&lt;br&gt;JB&amp;gt;ops (since they are CPU local). &amp;nbsp;sysctl handlers then sum up the various per-
&lt;br&gt;JB&amp;gt;CPU counts to report global counts to userland.
&lt;br&gt;&lt;br&gt;I see. I was also thinking along these lines, but was not sure whether it 
&lt;br&gt;is worth the trouble. I suppose this does not help to implement 64-bit 
&lt;br&gt;counters on 32-bit architectures, though, because you cannot read them 
&lt;br&gt;reliably without locking to sum them up, right?
&lt;br&gt;&lt;br&gt;harti
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26798762&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26798762&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26798762.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26798180</id>
	<title>Re: network statistics in SMP</title>
	<published>2009-12-15T09:08:09Z</published>
	<updated>2009-12-15T09:08:09Z</updated>
	<author>
		<name>Julian Elischer</name>
	</author>
	<content type="html">John Baldwin wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tuesday 15 December 2009 4:38:04 am Harti Brandt wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'm working on our network statistics (in the context of SNMP) and wonder, 
&lt;br&gt;&amp;gt;&amp;gt; to what extend we want them to be correct. I've re-read part of the past 
&lt;br&gt;&amp;gt;&amp;gt; discussions about 64-bit counters on 32-bit archs and got the impression, 
&lt;br&gt;&amp;gt;&amp;gt; that there are users that would like to have almost correct statistics 
&lt;br&gt;&amp;gt;&amp;gt; (for accounting, for example). If this is the case I wonder whether the 
&lt;br&gt;&amp;gt;&amp;gt; way we do the statistics today is correct.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Basically all statistics are incremented or added to simply by a += b oder 
&lt;br&gt;&amp;gt;&amp;gt; a++. As I understand, this worked fine in the old days, where you had 
&lt;br&gt;&amp;gt;&amp;gt; spl*() calls at the right places. Nowadays when everything is SMP 
&lt;br&gt;&amp;gt;&amp;gt; shouldn't we use at least atomic operations for this? Also I read that on 
&lt;br&gt;&amp;gt;&amp;gt; architectures where cache coherency is not implemented in hardware even 
&lt;br&gt;&amp;gt;&amp;gt; this does not help (I found a mail from jhb why for the mutex 
&lt;br&gt;&amp;gt;&amp;gt; implementation this is not a problem, but I don't understand what to do 
&lt;br&gt;&amp;gt;&amp;gt; for the += and ++ operations). I failed to find a way, though, to 
&lt;br&gt;&amp;gt;&amp;gt; influence the caching policy (is there a function one can call to 
&lt;br&gt;&amp;gt;&amp;gt; change the policy?).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Atomic ops will always work for reliable statistics. &amp;nbsp;However, I believe 
&lt;br&gt;&amp;gt; Robert is working on using per-CPU statistics for TCP, UDP, etc. similar to 
&lt;br&gt;&amp;gt; what we do now for many of the 'cnt' stats (context switches, etc.). &amp;nbsp;For 
&lt;br&gt;&amp;gt; 'cnt' each CPU has its own count of stats that are updated using non-atomic 
&lt;br&gt;&amp;gt; ops (since they are CPU local). &amp;nbsp;sysctl handlers then sum up the various per-
&lt;br&gt;&amp;gt; CPU counts to report global counts to userland.
&lt;/div&gt;&lt;br&gt;the trouble is that PCPU and VNET collide. &amp;nbsp;you then need to have
&lt;br&gt;Per-CPU, per VNET counters. which would be yet a different pool of 
&lt;br&gt;linker set symbols..
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26798180&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26798180&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26798180.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26797800</id>
	<title>Re: network statistics in SMP</title>
	<published>2009-12-15T05:12:35Z</published>
	<updated>2009-12-15T05:12:35Z</updated>
	<author>
		<name>jhb-3</name>
	</author>
	<content type="html">On Tuesday 15 December 2009 4:38:04 am Harti Brandt wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm working on our network statistics (in the context of SNMP) and wonder, 
&lt;br&gt;&amp;gt; to what extend we want them to be correct. I've re-read part of the past 
&lt;br&gt;&amp;gt; discussions about 64-bit counters on 32-bit archs and got the impression, 
&lt;br&gt;&amp;gt; that there are users that would like to have almost correct statistics 
&lt;br&gt;&amp;gt; (for accounting, for example). If this is the case I wonder whether the 
&lt;br&gt;&amp;gt; way we do the statistics today is correct.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Basically all statistics are incremented or added to simply by a += b oder 
&lt;br&gt;&amp;gt; a++. As I understand, this worked fine in the old days, where you had 
&lt;br&gt;&amp;gt; spl*() calls at the right places. Nowadays when everything is SMP 
&lt;br&gt;&amp;gt; shouldn't we use at least atomic operations for this? Also I read that on 
&lt;br&gt;&amp;gt; architectures where cache coherency is not implemented in hardware even 
&lt;br&gt;&amp;gt; this does not help (I found a mail from jhb why for the mutex 
&lt;br&gt;&amp;gt; implementation this is not a problem, but I don't understand what to do 
&lt;br&gt;&amp;gt; for the += and ++ operations). I failed to find a way, though, to 
&lt;br&gt;&amp;gt; influence the caching policy (is there a function one can call to 
&lt;br&gt;&amp;gt; change the policy?).
&lt;/div&gt;&lt;br&gt;Atomic ops will always work for reliable statistics. &amp;nbsp;However, I believe 
&lt;br&gt;Robert is working on using per-CPU statistics for TCP, UDP, etc. similar to 
&lt;br&gt;what we do now for many of the 'cnt' stats (context switches, etc.). &amp;nbsp;For 
&lt;br&gt;'cnt' each CPU has its own count of stats that are updated using non-atomic 
&lt;br&gt;ops (since they are CPU local). &amp;nbsp;sysctl handlers then sum up the various per-
&lt;br&gt;CPU counts to report global counts to userland.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Baldwin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26797800&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26797800&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26797800.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26792190</id>
	<title>network statistics in SMP</title>
	<published>2009-12-15T01:38:04Z</published>
	<updated>2009-12-15T01:38:04Z</updated>
	<author>
		<name>Harti Brandt</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I'm working on our network statistics (in the context of SNMP) and wonder, 
&lt;br&gt;to what extend we want them to be correct. I've re-read part of the past 
&lt;br&gt;discussions about 64-bit counters on 32-bit archs and got the impression, 
&lt;br&gt;that there are users that would like to have almost correct statistics 
&lt;br&gt;(for accounting, for example). If this is the case I wonder whether the 
&lt;br&gt;way we do the statistics today is correct.
&lt;br&gt;&lt;br&gt;Basically all statistics are incremented or added to simply by a += b oder 
&lt;br&gt;a++. As I understand, this worked fine in the old days, where you had 
&lt;br&gt;spl*() calls at the right places. Nowadays when everything is SMP 
&lt;br&gt;shouldn't we use at least atomic operations for this? Also I read that on 
&lt;br&gt;architectures where cache coherency is not implemented in hardware even 
&lt;br&gt;this does not help (I found a mail from jhb why for the mutex 
&lt;br&gt;implementation this is not a problem, but I don't understand what to do 
&lt;br&gt;for the += and ++ operations). I failed to find a way, though, to 
&lt;br&gt;influence the caching policy (is there a function one can call to 
&lt;br&gt;change the policy?).
&lt;br&gt;&lt;br&gt;Any opinions?
&lt;br&gt;harti
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26792190&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26792190&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/network-statistics-in-SMP-tp26792190p26792190.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26784839</id>
	<title>Re: src/Makefile, universe, LINT, VIMAGE, ..</title>
	<published>2009-12-14T13:01:41Z</published>
	<updated>2009-12-14T13:01:41Z</updated>
	<author>
		<name>Bjoern A. Zeeb-2</name>
	</author>
	<content type="html">On Mon, 14 Dec 2009, John Baldwin wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I think you can drop the 'KERNCONFS:= ${KERNCONFS}' line now.
&lt;br&gt;&lt;br&gt;So I did; thanks.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Index: sys/conf/makeLINT.mk
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ===================================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; --- sys/conf/makeLINT.mk	(revision 198467)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +++ sys/conf/makeLINT.mk	(working copy)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; @@ -5,7 +5,15 @@
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; clean:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 	rm -f LINT
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +.if ${TARGET} == &amp;quot;amd64&amp;quot; || ${TARGET} == &amp;quot;i386&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +	rm -f LINT=VIMAGE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +.endif
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; s/=/-/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Yeah, everyone notics that one; it should be fixed in the patch at the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; URL originally referenced.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is still here. :)
&lt;/div&gt;&lt;br&gt;*grump* &amp;nbsp;I had fixed it in the patch but not in my working tree.
&lt;br&gt;&lt;br&gt;New try:
&lt;br&gt;&lt;a href=&quot;http://people.freebsd.org/~bz/20091214-01-make-LINT-VIMAGE.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.freebsd.org/~bz/20091214-01-make-LINT-VIMAGE.diff&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Bjoern A. Zeeb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; It will not break if you know what you are doing.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26784839&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26784839&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/src-Makefile%2C-universe%2C-LINT%2C-VIMAGE%2C-..-tp26048169p26784839.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26780998</id>
	<title>Re: src/Makefile, universe, LINT, VIMAGE, ..</title>
	<published>2009-12-14T08:19:36Z</published>
	<updated>2009-12-14T08:19:36Z</updated>
	<author>
		<name>jhb-3</name>
	</author>
	<content type="html">On Sunday 13 December 2009 2:55:58 pm Bjoern A. Zeeb wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Also, I would probably prefer to have
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; universe_kernels come after universe_$target and before 
&lt;br&gt;universe_epilogue.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I think that should be possible to sneak it in after the the .endfor.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I fixed those; I needed to allow the target for the outer .if make()
&lt;br&gt;&amp;gt; though with that.
&lt;br&gt;&lt;br&gt;I think you can drop the 'KERNCONFS:= ${KERNCONFS}' line now.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Index: sys/conf/makeLINT.mk
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; ===================================================================
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; --- sys/conf/makeLINT.mk	(revision 198467)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; +++ sys/conf/makeLINT.mk	(working copy)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; @@ -5,7 +5,15 @@
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp; clean:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 	rm -f LINT
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; +.if ${TARGET} == &amp;quot;amd64&amp;quot; || ${TARGET} == &amp;quot;i386&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; +	rm -f LINT=VIMAGE
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; +.endif
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; s/=/-/
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Yeah, everyone notics that one; it should be fixed in the patch at the
&lt;br&gt;&amp;gt; &amp;gt; URL originally referenced.
&lt;/div&gt;&lt;br&gt;This is still here. :)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Baldwin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780998&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780998&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/src-Makefile%2C-universe%2C-LINT%2C-VIMAGE%2C-..-tp26048169p26780998.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26776096</id>
	<title>Current problem reports assigned to freebsd-arch@FreeBSD.org</title>
	<published>2009-12-14T03:06:50Z</published>
	<updated>2009-12-14T03:06:50Z</updated>
	<author>
		<name>FreeBSD bugmaster</name>
	</author>
	<content type="html">Note: to view an individual PR, use:
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;The following is a listing of current problems submitted by FreeBSD users.
&lt;br&gt;These represent problem reports covering all versions including
&lt;br&gt;experimental development code and obsolete releases.
&lt;br&gt;&lt;br&gt;&lt;br&gt;S Tracker &amp;nbsp; &amp;nbsp; &amp;nbsp;Resp. &amp;nbsp; &amp;nbsp; &amp;nbsp;Description
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;o kern/120749 &amp;nbsp;arch &amp;nbsp; &amp;nbsp; &amp;nbsp; [request] Suggest upping the default kern.ps_arg_cache
&lt;br&gt;&lt;br&gt;1 problem total.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776096&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776096&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Current-problem-reports-assigned-to-freebsd-arch%40FreeBSD.org-tp26776096p26776096.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26769189</id>
	<title>Re: src/Makefile, universe, LINT, VIMAGE, ..</title>
	<published>2009-12-13T11:55:58Z</published>
	<updated>2009-12-13T11:55:58Z</updated>
	<author>
		<name>Bjoern A. Zeeb-2</name>
	</author>
	<content type="html">On Mon, 26 Oct 2009, Bjoern A. Zeeb wrote:
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, 26 Oct 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; @@ -345,3 +333,18 @@
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 	fi
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; .endif
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; .endif
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +universe_kernels: universe_kernels_foo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +TARGET?=	${BUILD_ARCH}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +KERNCONFS!=	cd ${.CURDIR}/sys/${TARGET}/conf &amp;&amp; \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +		! -name DEFAULTS ! -name NOTES
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +KERNCONFS:=	${KERNCONFS}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +universe_kernels_foo:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +.for kernel in ${KERNCONFS}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	@(cd ${.CURDIR} &amp;&amp; env __MAKE_CONF=/dev/null \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	 &amp;nbsp; &amp;nbsp;${MAKE} ${JFLAG} buildkernel TARGET=${TARGET} KERNCONF=${kernel} 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	 &amp;nbsp; &amp;nbsp;&amp;gt; _.${TARGET}.${kernel} 2&amp;gt;&amp;1 || \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	 &amp;nbsp; &amp;nbsp;(echo &amp;quot;${TARGET} ${kernel} kernel failed,&amp;quot; \
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	 &amp;nbsp; &amp;nbsp;&amp;quot;check _.${TARGET}.${kernel} for details&amp;quot;| ${MAKEFAIL}))
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +.endfor
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Hmm, I'm not sure why you need a universe_kernels_foo target that
&lt;br&gt;&amp;gt;&amp;gt; universe_kernels depends on?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is all about make and the variables after a target and within a
&lt;br&gt;&amp;gt; target. Whatever else I tried: make complained. &amp;nbsp;If you know the
&lt;br&gt;&amp;gt; rightbetter solution that works I'll be happy to simplify this and
&lt;br&gt;&amp;gt; update the patch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It shouldn't be named _foo though;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Also, I would probably prefer to have
&lt;br&gt;&amp;gt;&amp;gt; universe_kernels come after universe_$target and before universe_epilogue.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think that should be possible to sneak it in after the the .endfor.
&lt;/div&gt;&lt;br&gt;I fixed those; I needed to allow the target for the outer .if make()
&lt;br&gt;though with that.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Index: sys/conf/makeLINT.mk
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ===================================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; --- sys/conf/makeLINT.mk	(revision 198467)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +++ sys/conf/makeLINT.mk	(working copy)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; @@ -5,7 +5,15 @@
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; clean:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 	rm -f LINT
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +.if ${TARGET} == &amp;quot;amd64&amp;quot; || ${TARGET} == &amp;quot;i386&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	rm -f LINT=VIMAGE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +.endif
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; s/=/-/
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yeah, everyone notics that one; it should be fixed in the patch at the
&lt;br&gt;&amp;gt; URL originally referenced.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; BTW, I'm not sure why you would only enable VIMAGE for these two archs 
&lt;br&gt;&amp;gt;&amp;gt; rather
&lt;br&gt;&amp;gt;&amp;gt; than doing it for all archs that have a LINT?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Because it'll usually simply not make any sense to build a VIMAGE
&lt;br&gt;&amp;gt; kernel for embedded platforms like arm, ... &amp;nbsp;Also make universe time
&lt;br&gt;&amp;gt; increases significantly with any platform; indeed amd64 is the worst
&lt;br&gt;&amp;gt; now (again). &amp;nbsp;We can talk about the proper set and I had thought of
&lt;br&gt;&amp;gt; sparc64 as well. &amp;nbsp;Obviously just building it everywhere simplifies
&lt;br&gt;&amp;gt; things.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;An updated patch to test would be here:
&lt;br&gt;&lt;a href=&quot;http://people.freebsd.org/~bz/20091213-01-make-LINT-VIMAGE.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.freebsd.org/~bz/20091213-01-make-LINT-VIMAGE.diff&lt;/a&gt;&lt;br&gt;&lt;br&gt;/bz
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Bjoern A. Zeeb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; It will not break if you know what you are doing.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26769189&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26769189&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/src-Makefile%2C-universe%2C-LINT%2C-VIMAGE%2C-..-tp26048169p26769189.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26728398</id>
	<title>Re: Testing CAM wrapper for ata(4) controller drivers</title>
	<published>2009-12-10T06:31:41Z</published>
	<updated>2009-12-10T06:31:41Z</updated>
	<author>
		<name>Scott Long-2</name>
	</author>
	<content type="html">On Dec 10, 2009, at 3:02 AM, Alexander Motin wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Alexander Motin wrote:
&lt;br&gt;&amp;gt;&amp;gt; The main regression of the new mode is a lack of ataraid &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; alternative, to
&lt;br&gt;&amp;gt;&amp;gt; support cheap BIOS-based ATA RAIDs. If somebody has time and wish to
&lt;br&gt;&amp;gt;&amp;gt; port that code from inside ata(4) into GEOM module, to make it work &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; over
&lt;br&gt;&amp;gt;&amp;gt; CAM also, I would appreciate that and propose a help, if needed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; May be it would be easier to just teach gmirror, gstripe and gconcat &amp;nbsp;
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; handle ATA RAIDs metadata formats, to not duplicate and support the &amp;nbsp;
&lt;br&gt;&amp;gt; rest
&lt;br&gt;&amp;gt; of code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;The existing graid modules are not well suited for learning new &amp;nbsp;
&lt;br&gt;metadata. &amp;nbsp;I have plans for restructuring them into a stack within &amp;nbsp;
&lt;br&gt;GEOM that handles metadata separate from the transforms.
&lt;br&gt;&lt;br&gt;Scott
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26728398&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26728398&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Testing-CAM-wrapper-for-ata%284%29-controller-drivers-tp26724676p26728398.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26724676</id>
	<title>Re: Testing CAM wrapper for ata(4) controller drivers</title>
	<published>2009-12-10T02:02:08Z</published>
	<updated>2009-12-10T02:02:08Z</updated>
	<author>
		<name>Alexander Motin-3</name>
	</author>
	<content type="html">Alexander Motin wrote:
&lt;br&gt;&amp;gt; The main regression of the new mode is a lack of ataraid alternative, to
&lt;br&gt;&amp;gt; support cheap BIOS-based ATA RAIDs. If somebody has time and wish to
&lt;br&gt;&amp;gt; port that code from inside ata(4) into GEOM module, to make it work over
&lt;br&gt;&amp;gt; CAM also, I would appreciate that and propose a help, if needed.
&lt;br&gt;&lt;br&gt;May be it would be easier to just teach gmirror, gstripe and gconcat to
&lt;br&gt;handle ATA RAIDs metadata formats, to not duplicate and support the rest
&lt;br&gt;of code.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Alexander Motin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26724676&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26724676&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Testing-CAM-wrapper-for-ata%284%29-controller-drivers-tp26724676p26724676.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26716476</id>
	<title>Re: Inquiry about the 7.2 release CD/DVD</title>
	<published>2009-12-09T11:45:57Z</published>
	<updated>2009-12-09T11:45:57Z</updated>
	<author>
		<name>Julian H. Stacey-3</name>
	</author>
	<content type="html">Doug Barton wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Julian H. Stacey wrote:
&lt;br&gt;&amp;gt; &amp;gt; Roger Agraviador wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I am quite new to BSD (Open source OS'es in general)
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; This arch@ list is for complex advanced questions, so please send
&lt;br&gt;&amp;gt; &amp;gt; future simple beginner questions to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26716476&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;questions@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; A more friendly way to say that would be, &amp;quot;If you're not sure where to
&lt;br&gt;&amp;gt; send a question about FreeBSD &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26716476&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-questions@...&lt;/a&gt; is always
&lt;br&gt;&amp;gt; a safe bet.&amp;quot; :)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; We were all beginners once, and we like to encourage them as much as
&lt;br&gt;&amp;gt; possible.
&lt;/div&gt;&lt;br&gt;Doug did not answer Roger. I took time so Roger would get an answer,
&lt;br&gt;while saving time of specialists on @arch who didn't need to lose
&lt;br&gt;time answering simple questions. &amp;nbsp;Criticism off list please.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Julian
&lt;br&gt;-- 
&lt;br&gt;Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich &lt;a href=&quot;http://berklix.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://berklix.com&lt;/a&gt;&lt;br&gt;Mail plain text not quoted-printable, HTML or Base64: &amp;nbsp;&lt;a href=&quot;http://asciiribbon.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://asciiribbon.org&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26716476&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26716476&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Inquiry-about-the-7.2-release-CD-DVD-tp26701777p26716476.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26703759</id>
	<title>Re: Inquiry about the 7.2 release CD/DVD</title>
	<published>2009-12-08T17:00:03Z</published>
	<updated>2009-12-08T17:00:03Z</updated>
	<author>
		<name>dougb-2</name>
	</author>
	<content type="html">Julian H. Stacey wrote:
&lt;br&gt;&amp;gt; Roger Agraviador wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt;&amp;gt; I am quite new to BSD (Open source OS'es in general)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This arch@ list is for complex advanced questions, so please send
&lt;br&gt;&amp;gt; future simple beginner questions to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703759&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;questions@...&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;A more friendly way to say that would be, &amp;quot;If you're not sure where to
&lt;br&gt;send a question about FreeBSD &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703759&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-questions@...&lt;/a&gt; is always
&lt;br&gt;a safe bet.&amp;quot; :)
&lt;br&gt;&lt;br&gt;We were all beginners once, and we like to encourage them as much as
&lt;br&gt;possible.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Doug
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Improve the effectiveness of your Internet presence with
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a domain name makeover! &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://SupersetSolutions.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://SupersetSolutions.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703759&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26703759&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Inquiry-about-the-7.2-release-CD-DVD-tp26701777p26703759.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26702345</id>
	<title>Re: Inquiry about the 7.2 release CD/DVD</title>
	<published>2009-12-08T14:57:55Z</published>
	<updated>2009-12-08T14:57:55Z</updated>
	<author>
		<name>Julian H. Stacey-3</name>
	</author>
	<content type="html">Roger Agraviador wrote:
&lt;br&gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt; I am quite new to BSD (Open source OS'es in general)
&lt;br&gt;&lt;br&gt;This arch@ list is for complex advanced questions, so please send
&lt;br&gt;future simple beginner questions to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;questions@...&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&amp;gt; and would like to &amp;nbsp;
&lt;br&gt;&amp;gt; try the 7.2 release,
&lt;br&gt;&lt;br&gt;8.0 is out now too, if you'r feeling adventurous.
&lt;br&gt;&lt;br&gt;&amp;gt; If I where to purchase a copy would it be &amp;nbsp;
&lt;br&gt;&amp;gt; possible to use it in several computers with different processors? &amp;nbsp;
&lt;br&gt;&lt;br&gt;The DVDs that freebsd.org offer free for download are for one CPU only.
&lt;br&gt;(though both i386 &amp; amd64 DVDs &amp; CDs will run on amd64 CPU).
&lt;br&gt;&lt;br&gt;&amp;gt; Since I am planning to make a computer with an AMD Athlon II 64, and &amp;nbsp;
&lt;br&gt;&amp;gt; If I am happy with it, i'd like to share it with my relatives and &amp;nbsp;
&lt;br&gt;&amp;gt; friends if that is possible or would sharing violate any legal rights &amp;nbsp;
&lt;br&gt;&amp;gt; and licenses?
&lt;br&gt;&lt;br&gt;FreeBSD would like you to give FreeBSD free to lots of people :-)
&lt;br&gt;&lt;br&gt;You can download the generic FreeBSD DVDs, burn them, copy them,
&lt;br&gt;sell them even. Read the 6K Coyright in /usr/src/COPYRIGHT
&lt;br&gt;which one might summarise crudely as:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;Do what you want, but don't blame us&amp;quot; :-)
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.freebsd.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org&lt;/a&gt;&amp;nbsp;also lists some commercial vendors of DVDs,
&lt;br&gt;&amp;nbsp; If you choose to buy those discs rather than download &amp; burn the
&lt;br&gt;&amp;nbsp; free ones direct from &lt;a href=&quot;http://www.freebsd.orgm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.orgm&lt;/a&gt;&amp;nbsp;then an additional
&lt;br&gt;&amp;nbsp; agregation copyright may apply from the agregator firm, in which
&lt;br&gt;&amp;nbsp; case for those, you may not be entitled to make copies of the DVD
&lt;br&gt;&amp;nbsp; image, but are entitled to make unlimited copies of source code
&lt;br&gt;&amp;nbsp; from FreeBSD.
&lt;br&gt;&lt;br&gt;The individual extra 20,918 ported packages have a myriad
&lt;br&gt;of different licences, depending which ones you want to add.
&lt;br&gt;&lt;br&gt;Please read &lt;a href=&quot;http://www.freebsd.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org&lt;/a&gt;&amp;nbsp;&amp; use &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702345&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;questions@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Julian
&lt;br&gt;-- 
&lt;br&gt;Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich &lt;a href=&quot;http://berklix.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://berklix.com&lt;/a&gt;&lt;br&gt;Mail plain text not quoted-printable, HTML or Base64: &amp;nbsp;&lt;a href=&quot;http://asciiribbon.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://asciiribbon.org&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702345&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702345&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Inquiry-about-the-7.2-release-CD-DVD-tp26701777p26702345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26702372</id>
	<title>Re: Inquiry about the 7.2 release CD/DVD</title>
	<published>2009-12-08T14:43:14Z</published>
	<updated>2009-12-08T14:43:14Z</updated>
	<author>
		<name>Miroslav Lachman</name>
	</author>
	<content type="html">Roger Agraviador wrote:
&lt;br&gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am quite new to BSD (Open source OS'es in general) and would like to
&lt;br&gt;&amp;gt; try the 7.2 release, If I where to purchase a copy would it be possible
&lt;br&gt;&amp;gt; to use it in several computers with different processors? Since I am
&lt;br&gt;&amp;gt; planning to make a computer with an AMD Athlon II 64, and If I am happy
&lt;br&gt;&amp;gt; with it, i'd like to share it with my relatives and friends if that is
&lt;br&gt;&amp;gt; possible or would sharing violate any legal rights and licenses?
&lt;br&gt;&lt;br&gt;All FreeBSD releases are freely available for download as ISO images. 
&lt;br&gt;You can download them, burn them and share them with anybody you want.
&lt;br&gt;The only thing you need to be aware of is the processor type. If you 
&lt;br&gt;what to run 32bit OS, you need i386 ISO image / CD. If you want 64bit 
&lt;br&gt;OS, you need amd64 ISO / CD.
&lt;br&gt;(there are images for alpha, ia64, pc98, powerpc and sparc64 too)
&lt;br&gt;ftp://ftp.freebsd.org/pub/FreeBSD/
&lt;br&gt;&lt;br&gt;FreeBSD is made under BSD license: 
&lt;br&gt;&lt;a href=&quot;http://www.freebsd.org/copyright/freebsd-license.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/copyright/freebsd-license.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Miroslav Lachman
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702372&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26702372&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Inquiry-about-the-7.2-release-CD-DVD-tp26701777p26702372.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26701777</id>
	<title>Inquiry about the 7.2 release CD/DVD</title>
	<published>2009-12-08T13:40:03Z</published>
	<updated>2009-12-08T13:40:03Z</updated>
	<author>
		<name>Roger Agraviador</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I am quite new to BSD (Open source OS'es in general) and would like to &amp;nbsp;
&lt;br&gt;try the 7.2 release, If I where to purchase a copy would it be &amp;nbsp;
&lt;br&gt;possible to use it in several computers with different processors? &amp;nbsp;
&lt;br&gt;Since I am planning to make a computer with an AMD Athlon II 64, and &amp;nbsp;
&lt;br&gt;If I am happy with it, i'd like to share it with my relatives and &amp;nbsp;
&lt;br&gt;friends if that is possible or would sharing violate any legal rights &amp;nbsp;
&lt;br&gt;and licenses?
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;&amp;nbsp; Roger
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701777&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26701777&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Inquiry-about-the-7.2-release-CD-DVD-tp26701777p26701777.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26675708</id>
	<title>Current problem reports assigned to freebsd-arch@FreeBSD.org</title>
	<published>2009-12-07T03:06:49Z</published>
	<updated>2009-12-07T03:06:49Z</updated>
	<author>
		<name>FreeBSD bugmaster</name>
	</author>
	<content type="html">Note: to view an individual PR, use:
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;The following is a listing of current problems submitted by FreeBSD users.
&lt;br&gt;These represent problem reports covering all versions including
&lt;br&gt;experimental development code and obsolete releases.
&lt;br&gt;&lt;br&gt;&lt;br&gt;S Tracker &amp;nbsp; &amp;nbsp; &amp;nbsp;Resp. &amp;nbsp; &amp;nbsp; &amp;nbsp;Description
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;o kern/120749 &amp;nbsp;arch &amp;nbsp; &amp;nbsp; &amp;nbsp; [request] Suggest upping the default kern.ps_arg_cache
&lt;br&gt;&lt;br&gt;1 problem total.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26675708&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26675708&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Current-problem-reports-assigned-to-freebsd-arch%40FreeBSD.org-tp26675708p26675708.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26634034</id>
	<title>struct if_data and ifmibdata</title>
	<published>2009-12-03T13:18:08Z</published>
	<updated>2009-12-03T13:18:08Z</updated>
	<author>
		<name>Harti Brandt</name>
	</author>
	<content type="html">&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I'm currently working on the networking MIBs for bsnmpd to implement the 
&lt;br&gt;more recent RFCs (including IPv6 stuff). While doing this I run into 
&lt;br&gt;numerous problems accessing interface information. The two sources of this 
&lt;br&gt;information are $subj, each of which has some problems. The main problem 
&lt;br&gt;is missing flexibility because of ABI issues. I have some ideas how to 
&lt;br&gt;relax this somewhat, but before starting to implement anything I though I 
&lt;br&gt;ask around whether this makes sense.
&lt;br&gt;&lt;br&gt;1. struct if_data.
&lt;br&gt;&lt;br&gt;This is embedded into struct ifnet, so any change in size changes the 
&lt;br&gt;ifnet offsets which is bad once we start keeping the ABI stable in 
&lt;br&gt;-current. Other problems are:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- hard to find out what version of struct if_data one is retrieving via 
&lt;br&gt;either the if_msghdr routing message or via the interface MIB
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- we've run out of ifi_type (u_char) space. IANAIfType is currently at 
&lt;br&gt;251. Actually some of our private defines in if_types.h already overlap 
&lt;br&gt;IANA assigned types
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- ifi_physical is not used anywhere in the kernel as far as I can see 
&lt;br&gt;and should probably be removed together with the associated ioctls. This 
&lt;br&gt;seems to be replaced long time ago by the if_media stuff.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- we've run out of if_baudrate space (u_long) on 32-bit architectures 
&lt;br&gt;for 10GBit/s interfaces
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- broadcast packet statistics are missing (they are required by the 
&lt;br&gt;actual IF-MIB)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- ifi_datalen is rather short (u_char) and restricts structure size to
&lt;br&gt;256 bytes.
&lt;br&gt;&lt;br&gt;So what I would like to do is:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- add a version field at the beginning and a #define to help user 
&lt;br&gt;programs in working with different versions of this structure
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- add a couple of dozens of bytes at the end to allow extending the 
&lt;br&gt;structure without changing its size
&lt;br&gt;&lt;br&gt;2. struct ifmibdata
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- add a version field here too.
&lt;br&gt;&lt;br&gt;3. struct ifmib_iso_8802_3
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- add a version field here too.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;- add dot3StatsSymbolErrors which are required by the current 
&lt;br&gt;EtherLike-MIB.
&lt;br&gt;&lt;br&gt;Unfortunately only 4 drivers actually implement the ethernet statistics 
&lt;br&gt;:-( so far
&lt;br&gt;&lt;br&gt;So, does this make any sense?
&lt;br&gt;&lt;br&gt;harti
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26634034&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26634034&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/struct-if_data-and-ifmibdata-tp26634034p26634034.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26595583</id>
	<title>Re: [PATCH] Statclock aliasing by LAPIC</title>
	<published>2009-12-01T08:31:56Z</published>
	<updated>2009-12-01T08:31:56Z</updated>
	<author>
		<name>Bruce Evans-4</name>
	</author>
	<content type="html">On Wed, 2 Dec 2009, Bruce Evans wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; ... &amp;nbsp;However, the
&lt;br&gt;&amp;gt; defaults with the lapic timer give an even larger beat frequency than
&lt;br&gt;&amp;gt; before, so I don't see how using the lapic timer can increase the
&lt;br&gt;&amp;gt; problem much. &amp;nbsp;(The beat frequency of (1000, 128) is 16000. &amp;nbsp;The beat
&lt;br&gt;&amp;gt; frequency of (1000, 133) is 133000. &amp;nbsp;The latter means that, with
&lt;br&gt;&amp;gt; defaults, statclock and hardclock() ticks are only perfectly synced
&lt;br&gt;&amp;gt; once in every 133 seconds. &amp;nbsp;Misconfiguring hz to a multiple of 128 can
&lt;br&gt;&amp;gt; give perfect synchronization, which may be a more of a problem, or a
&lt;br&gt;&amp;gt; fix -- see below).
&lt;br&gt;&lt;br&gt;PS (the see below part): with perfect sync, statclock() ticks can be
&lt;br&gt;kept perfectly out of phase, and this might work well. &amp;nbsp;E.g.:
&lt;br&gt;&lt;br&gt;(1) hz = 1000, stathz = 125, lapic_timer_hz = 2000: hz ticks on lapic
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ticks # 0, 2, 4, ...; stathz ticks on lapic ticks # 7, 15, 23, ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Malicious programs can still easily hide from statclock().
&lt;br&gt;&lt;br&gt;(2) hz = 100, stathz = 100, lapic_timer hz = 200: hz ticks on lapic
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ticks # 0, 2, 4, ...; stathz ticks on lapic ticks # 1, 3, 5, ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Malicious programs can easily predict statclock(), but can't
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;easily use more than half of the CPU: e.g.,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- run from hz tick N+epsilon to N+0.5-epsilon (seems to need frequent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clock_gettime() calls to determine when to give up control;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timeouts are no use since none can occur until tick N+1-epsilon)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;- usleep(1) and/or give up control to another process. &amp;nbsp;If the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;former only, then there can be no timeout until hz tick N+1-epsilon,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and we can hog at most half the CPU. &amp;nbsp;If the latter, then we
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;will need to find a different one quite often, else the victim
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;processes will accumulate ticks instead of use and they will be
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;de-scheduled instead of us. &amp;nbsp;fork() by us must not be cost-free,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else we can generate cooperating victim processes too easily for
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this and other types of hogging.
&lt;br&gt;&lt;br&gt;With a randomized statclock(), the randomness would have to be quite
&lt;br&gt;large and not just a small glitch on the increment like I said before,
&lt;br&gt;else maliciousness like in (2) would work to the extent that the
&lt;br&gt;non-glitch part is large.
&lt;br&gt;&lt;br&gt;Bruce
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595583&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26595583&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Statclock-aliasing-by-LAPIC-tp26549185p26595583.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26594214</id>
	<title>Re: [PATCH] Statclock aliasing by LAPIC</title>
	<published>2009-12-01T08:01:37Z</published>
	<updated>2009-12-01T08:01:37Z</updated>
	<author>
		<name>Andriy Gapon</name>
	</author>
	<content type="html">&lt;br&gt;BTW, we could also consider using periodic HPET timer (perhaps in legacy mode) for
&lt;br&gt;some of these tasks on modern hardware.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andriy Gapon
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594214&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26594214&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Statclock-aliasing-by-LAPIC-tp26549185p26594214.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26593696</id>
	<title>Re: [PATCH] Statclock aliasing by LAPIC</title>
	<published>2009-12-01T07:30:09Z</published>
	<updated>2009-12-01T07:30:09Z</updated>
	<author>
		<name>Bruce Evans-4</name>
	</author>
	<content type="html">On Mon, 30 Nov 2009, John Baldwin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Friday 27 November 2009 6:42:50 pm Attilio Rao wrote:
&lt;br&gt;&amp;gt;&amp;gt; Handling all the three clocks (hardclock, softclock, profclock) within
&lt;br&gt;&amp;gt;&amp;gt; the LAPIC can lead to aliasing for the softclock and profclock because
&lt;br&gt;&amp;gt;&amp;gt; hz is sized to fit mainly hardclock. The fashion to handle all of them
&lt;br&gt;&amp;gt;&amp;gt; within the LAPIC was introduced in 2005 and before than the softclock
&lt;br&gt;&amp;gt;&amp;gt; and profclock were supposed to be handled in the rtc. Right now, too,
&lt;br&gt;&amp;gt;&amp;gt; there is the necessary support to handle profclock and statclock in
&lt;br&gt;&amp;gt;&amp;gt; atrtc which gets enabled if the LAPIC signals it can't take in charge
&lt;br&gt;&amp;gt;&amp;gt; the three clocks.
&lt;br&gt;&amp;gt;&amp;gt; The proposed patch reverts the situation preferring the atrtc to
&lt;br&gt;&amp;gt;&amp;gt; handle the statclock and profclock (then a different source from the
&lt;br&gt;&amp;gt;&amp;gt; LAPIC) and then avoid the aliasing problem:
&lt;/div&gt;&lt;br&gt;This would defeat most of the point of using the lapic timer. &amp;nbsp;RTC
&lt;br&gt;interrupts are too slow to use for anything if there is an alternative
&lt;br&gt;like the lapic timer. &amp;nbsp;i8254 interrupts are not so bad, and in fact
&lt;br&gt;are just as efficient as lapic timer interrupts iff they are controlled
&lt;br&gt;by the APIC and not by the ATPIC. &amp;nbsp;This is because RTC interrupts must
&lt;br&gt;be acked and tested for in RTC registers, and the RTC is on the ISA
&lt;br&gt;bus so accessing it is very slow, while the i8254 is programmed for
&lt;br&gt;its interrupts to not need any acking or testing. &amp;nbsp;RTC and i8254
&lt;br&gt;interrupts may also be be controlled by the ATPIC, and then the ATPIC
&lt;br&gt;must be acked on the ISA bus too. &amp;nbsp;This gives the following number of
&lt;br&gt;ISA bus accesses for most interrupts:
&lt;br&gt;&lt;br&gt;device &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;read &amp;nbsp; &amp;nbsp;write
&lt;br&gt;------ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;---- &amp;nbsp; &amp;nbsp;-----
&lt;br&gt;lapic_timer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0
&lt;br&gt;i8254 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0+0/1
&lt;br&gt;RTC (current) &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;0+0/2
&lt;br&gt;RTC (old) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp;1+0/2
&lt;br&gt;&lt;br&gt;Here &amp;quot;+0/1&amp;quot; and &amp;quot;+0/2&amp;quot; are for the ATPIC ack, if any. &amp;nbsp;RTC (old) is
&lt;br&gt;before I optimized rtcin() to not write the index register in the usual
&lt;br&gt;case where it has not changed (writing the index register takes 1 extra
&lt;br&gt;write and uses 2 dummy reads in an attempt to satisfy timing requirements).
&lt;br&gt;However, there is apparently broken (or just incompatible) hardware
&lt;br&gt;that fails with this optimization. &amp;nbsp;There would probably be more reports
&lt;br&gt;of this brokenness if using the RTC became the default again.
&lt;br&gt;&lt;br&gt;The 4-6 ISA accesses for RTC (old) take about 4-9 usec, so using the
&lt;br&gt;RTC at stathz = 128 Hz takes only 0.05-0.12% of 1 CPU, which is
&lt;br&gt;acceptable. &amp;nbsp;Using the RTC at profhz = 1024 Hz takes 0.4-0.9% of 1
&lt;br&gt;CPU, which may also acceptable, but profhz = 1024 was too slow even
&lt;br&gt;for a 386/20 in 1993; it should be 200-1000 times larger now, but the
&lt;br&gt;RTC just can't support that, and one reason it was never increased is
&lt;br&gt;that the RTC is too inefficient. &amp;nbsp;Profiling can now be implemented
&lt;br&gt;better using the lapic timer, but using the lapic timer currently
&lt;br&gt;implements profiling slightly worse than using the RTC.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; In this patch, lapic_setup_clock() has been changed in order to return
&lt;br&gt;&amp;gt;&amp;gt; a three-states variable which identified if the LAPIC got in charge
&lt;br&gt;&amp;gt;&amp;gt; all the three clocks, just the hardclock or none of them (the current
&lt;br&gt;&amp;gt;&amp;gt; situation is just none/all) and the rtc handling runs subsequently.
&lt;br&gt;&amp;gt;&amp;gt; A tunable as been added to force LAPI to get in charge all the three
&lt;br&gt;&amp;gt;&amp;gt; clocks if needed.
&lt;br&gt;&amp;gt;&amp;gt; In ia32 atrtc compiling is linked to atpic compiling, so a compile
&lt;br&gt;&amp;gt;&amp;gt; time flag has been added to check if atpic is not present and in case
&lt;br&gt;&amp;gt;&amp;gt; force LAPIC to take in charge all the three clocks (which is still
&lt;br&gt;&amp;gt;&amp;gt; better than the 'safe belt values' still present in the rtc code).
&lt;/div&gt;&lt;br&gt;I don't like tunables, especially to switch from one bug to another.
&lt;br&gt;This can be done better using sysctls only, since it is not needed
&lt;br&gt;for booting. &amp;nbsp;The sysctls would need to be runnable at any time, but
&lt;br&gt;reprogramming the lapic timer at any time is already needed to
&lt;br&gt;fix profiling (cpu_start/stopprofclock() are missing support for
&lt;br&gt;the lapic timer; instead, the default lapic_timer_hz is set excessively
&lt;br&gt;large but not large enough for a good profhz). &amp;nbsp;sysctls also let you
&lt;br&gt;test this stuff without rebooting.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Please note that statclock and profclock are widely used in our kernel
&lt;br&gt;&amp;gt;&amp;gt; (rusage is, for example, statclock driven) and fixing this would
&lt;br&gt;&amp;gt;&amp;gt; result in specific improvements (as a several-reported wrong CPU usage
&lt;br&gt;&amp;gt;&amp;gt; statistic in top).
&lt;br&gt;&amp;gt;&amp;gt; This bug has been found by Sandvine Incorporated.
&lt;br&gt;&lt;br&gt;What bug exactly? &amp;nbsp;Bugs like this must have been found before 1993,
&lt;br&gt;since statclock() in 4.4BSD was supposed to fix them. &amp;nbsp;See &amp;quot;A Randomized
&lt;br&gt;Sampling Clock for CPU Utilization Estimation and Code Profiling&amp;quot;
&lt;br&gt;(ftp://ftp.ee.lbl.gov/papers/statclk-usenix93.ps.Z). &amp;nbsp;FreeBSD never
&lt;br&gt;implemented the &amp;quot;Randomized&amp;quot; part, but its statclock() used to sort
&lt;br&gt;of work, since by default stathz was &amp;gt; hz and was not nearly a multiple
&lt;br&gt;of hz. &amp;nbsp;Someone broke the former by increasing the default hz to 1000.
&lt;br&gt;This allowed malicious programs to easily hide themself from statclock()
&lt;br&gt;while consuming a large fraction of CPU cycles (when stathz was &amp;gt; hz,
&lt;br&gt;it was not so easy to hide, and very difficult to both hide and consume
&lt;br&gt;significant CPU, since timeout granularity makes it hard to control
&lt;br&gt;wakeups). &amp;nbsp;Then using the single lapic timer to generate all periodic
&lt;br&gt;timer interrupts increased the synchonization of these interrupts,
&lt;br&gt;thus moving further from a randomized statclock(). &amp;nbsp;However, the
&lt;br&gt;defaults with the lapic timer give an even larger beat frequency than
&lt;br&gt;before, so I don't see how using the lapic timer can increase the
&lt;br&gt;problem much. &amp;nbsp;(The beat frequency of (1000, 128) is 16000. &amp;nbsp;The beat
&lt;br&gt;frequency of (1000, 133) is 133000. &amp;nbsp;The latter means that, with
&lt;br&gt;defaults, statclock and hardclock() ticks are only perfectly synced
&lt;br&gt;once in every 133 seconds. &amp;nbsp;Misconfiguring hz to a multiple of 128 can
&lt;br&gt;give perfect synchronization, which may be a more of a problem, or a
&lt;br&gt;fix -- see below).
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Reviews, comments and testing are welcome.
&lt;br&gt;&lt;br&gt;Review of the part of the patch visible in the mail:
&lt;br&gt;&lt;br&gt;.
&lt;br&gt;&lt;br&gt;&amp;gt; Presumably in the RTC case lapic_timer_hz should always be hz and not some
&lt;br&gt;&amp;gt; multiple of hz.
&lt;br&gt;&lt;br&gt;Sure. &amp;nbsp;Except the allocation of the timers is backwards at best. &amp;nbsp;You
&lt;br&gt;need profhz on the most efficient timer so that it can be very large
&lt;br&gt;(other changes are required for large profhz to actually work). &amp;nbsp;You
&lt;br&gt;want stathz on the next most efficient timer so that it can be larger
&lt;br&gt;than hz (see above) (other changes are needed for a stathz much larger
&lt;br&gt;than 128 to actually work. &amp;nbsp;Note that at least SCHED_4BSD wants a
&lt;br&gt;scheduling clock frequency of much less than 128 -- it essentially
&lt;br&gt;divides stathz by 8 to get this. &amp;nbsp;Scaling in calcru() is currently
&lt;br&gt;broken after several hundred days of runtime, and would break sooner
&lt;br&gt;with larger stathz).
&lt;br&gt;&lt;br&gt;Perhaps your recent changes (that removed the literal constant dividers)
&lt;br&gt;made the synchronization problem worse. &amp;nbsp;But these changes make it
&lt;br&gt;easy to implement any number of independent timers with optional
&lt;br&gt;randomness using the lapic timer. &amp;nbsp;E.g., to randomize statclock(), just
&lt;br&gt;add a small random value (+-) as well as stathz. &amp;nbsp;Note that statistics
&lt;br&gt;utilities won't like this -- some like systat(1) use statistics ticks
&lt;br&gt;as a timebase so they want statclock() to be perfectly periodic.
&lt;br&gt;&lt;br&gt;I don't worry about the synchronization or broken profiling, and use
&lt;br&gt;lapic_timer_hz = profhz = stathz = hz = 100 whenever the lapic timer
&lt;br&gt;is used. &amp;nbsp;I haven't noticed any problems caused by this (mostly using
&lt;br&gt;SCHED_4BSD), except the unavoidable one that hz = 100 gives less
&lt;br&gt;accurate usr/sys decomposition than does hz = 1000. &amp;nbsp;I have noticed
&lt;br&gt;that this fixed the cosmetic problem that systat(1) shows glitches in
&lt;br&gt;the lapic timer interrupt rates: &amp;nbsp;Although using the lapic timer for
&lt;br&gt;all timer interrupts makes them all perfectly periodic, systat cannot
&lt;br&gt;see this because stathz = 133 is too small a sampling rate and is not
&lt;br&gt;an exact divisor of lapic_timer_hz -- it caused a glitch every
&lt;br&gt;lapic_timer_hz/stathz seconds. &amp;nbsp;For other interrupts, we wouldn't
&lt;br&gt;expect the rates to be constant, but we know that the lapic timer
&lt;br&gt;interrupt rate is constant so we know that the oscillation of its
&lt;br&gt;displayed value is a bug. &amp;nbsp;Right now on ref8-i386.freebsd.org, I see
&lt;br&gt;the values not oscillating much but being weird: for cpu0-1, they are
&lt;br&gt;near 1973; for cpu2-3, they are near 1981; for cpu4-5, they are near
&lt;br&gt;2043, and for cpu6-7 they are near 2003.
&lt;br&gt;&lt;br&gt;A tickless kernel would need to at least consider running the scheduler
&lt;br&gt;and statistics gathering on most context switches (unless it keeps using
&lt;br&gt;ticks when not idle). &amp;nbsp;The scheduler parts of this would also fix
&lt;br&gt;timer synchronization problems for !tickless kernels, but I don't see
&lt;br&gt;how they can be as efficient as only considering scheduling at
&lt;br&gt;infrequent tick intervals.
&lt;br&gt;&lt;br&gt;&amp;gt; Also, did you check to make sure all the lock is present? &amp;nbsp;I
&lt;br&gt;&amp;gt; think at one point I changed the locking for the RTC and/or ISA timer to just
&lt;br&gt;&amp;gt; use critical_enter/exit so that UP machines running an SMP kernel wouldn't pay
&lt;br&gt;&amp;gt; the locking overhead since the code was only used on UP machines. &amp;nbsp;It may very
&lt;br&gt;&amp;gt; well be that I only changed that in a development branch though and not in
&lt;br&gt;&amp;gt; HEAD.
&lt;br&gt;&lt;br&gt;I don't remember any locking changes for RTC ever being committed.
&lt;br&gt;rtcin() still uses mtx_lock_spin(&amp;clock_lock). &amp;nbsp;clock_lock is the i8254
&lt;br&gt;clock's lock, and is still abused for the RTC. &amp;nbsp;This abuse was convenient
&lt;br&gt;when the RTC driver was implemented in the same file as the i8254
&lt;br&gt;driver, but now the RTC driver is in its own file. &amp;nbsp;The i8254's private
&lt;br&gt;variable `clock_lock' is even declared in the RTC driver's public
&lt;br&gt;header, with other style bugs of course.
&lt;br&gt;&lt;br&gt;Bruce
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26593696&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26593696&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Statclock-aliasing-by-LAPIC-tp26549185p26593696.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26582975</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-30T14:13:19Z</published>
	<updated>2009-11-30T14:13:19Z</updated>
	<author>
		<name>Scott Long-2</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 30, 2009, at 12:27 PM, John Baldwin wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Sunday 29 November 2009 6:27:49 pm Scott Long wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Wednesday 20 May 2009 2:49:30 pm Jeff Roberson wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Tue, 19 May 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2) I worry that if all users do sglist_count() followed by a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; dynamic
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; allocation and then an _append() they will be very expensive.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; pmap_kextract() is much more expensive than it may first seem to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be. &amp;nbsp;Do
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; you have a user of count already?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The only one that does now is sglist_build() and nothing currently
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; uses that.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Kinda silly to have it then. &amp;nbsp;I also don't see the point of it; if &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; point of the sglist object is to avoid VA mappings, then why start
&lt;br&gt;&amp;gt;&amp;gt; with a VA mapping? &amp;nbsp;But that aside, Jeff is correct, sglist_build() &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; is
&lt;br&gt;&amp;gt;&amp;gt; horribly inefficient.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It actually does get used by the nvidia driver, but so far in what I &amp;nbsp;
&lt;br&gt;&amp;gt; have
&lt;br&gt;&amp;gt; done in my jhb_bio branch I have tried several different approaches &amp;nbsp;
&lt;br&gt;&amp;gt; which
&lt;br&gt;&amp;gt; is why the API is as verbose as it is.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; VOP_GET/PUTPAGES would not need to do this since they could simply
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; append
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the physical addresses extracted directly from vm_page_t's for
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; example. &amp;nbsp;I'm
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; not sure this will be used very much now as originally I thought I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; would be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; changing all storage drivers to do all DMA operations using sglists
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; sort of thing would have been used for non-bio requests like &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; firmware
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; commands; however, as expounded on below, it actually appears better
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; still treat bio's separate from non-bio requests for bus_dma so that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; non-bio requests can continue to use bus_dmamap_load_buffer() as
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; they do
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; now.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I completely disagree with your approach to busdma, but I'll get into
&lt;br&gt;&amp;gt;&amp;gt; that later. &amp;nbsp;What I really don't understand is, why have yet another
&lt;br&gt;&amp;gt;&amp;gt; page description format? &amp;nbsp;Whether the I/O is disk buffers being &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; pushed
&lt;br&gt;&amp;gt;&amp;gt; by a pager to a disk controller, or texture buffers being pushed to
&lt;br&gt;&amp;gt;&amp;gt; video hardware, they already have vm objects associated with them,
&lt;br&gt;&amp;gt;&amp;gt; no? &amp;nbsp;Why translate to an intermediate format? &amp;nbsp;I understand that
&lt;br&gt;&amp;gt;&amp;gt; you're creating another vm object format to deal directly with the
&lt;br&gt;&amp;gt;&amp;gt; needs of nvidia, but that's really a one-off case right now. &amp;nbsp;What
&lt;br&gt;&amp;gt;&amp;gt; about when we want the pagedaemon to push unmapped i/o? &amp;nbsp;Will it have
&lt;br&gt;&amp;gt;&amp;gt; to spend cycles translating its objects to sglists? &amp;nbsp;This is really a
&lt;br&gt;&amp;gt;&amp;gt; larger question that I'm not prepared to answer, but would like to
&lt;br&gt;&amp;gt;&amp;gt; discuss.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Textures do not already have objects associated, no. &amp;nbsp;However, I did &amp;nbsp;
&lt;br&gt;&amp;gt; not
&lt;br&gt;&amp;gt; design sglist with Nvidia in mind. &amp;nbsp;I hacked on it in conjunction with
&lt;br&gt;&amp;gt; phk@, gibbs@, and jeff@ to work on unmapped bio support. &amp;nbsp;That was the
&lt;br&gt;&amp;gt; only motivation for sglist(9). &amp;nbsp;Only the OBJT_SG bits were specific to
&lt;br&gt;&amp;gt; Nvidia and that was added as an afterthought because sglist(9) already
&lt;br&gt;&amp;gt; existed in the jhb_bio branch.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you look at GETPAGES/PUTPAGES they already deal in terms of &amp;nbsp;
&lt;br&gt;&amp;gt; vm_page_t's,
&lt;br&gt;&amp;gt; not VM objects, and vm_page_t's already provide a linear time way of &amp;nbsp;
&lt;br&gt;&amp;gt; fetching
&lt;br&gt;&amp;gt; the physical address (m-&amp;gt;phys_addr), so generating an sglist for &amp;nbsp;
&lt;br&gt;&amp;gt; GETPAGES and
&lt;br&gt;&amp;gt; PUTPAGES will be very cheap. &amp;nbsp;One of the original proposals from &amp;nbsp;
&lt;br&gt;&amp;gt; phk@ was
&lt;br&gt;&amp;gt; actually to pass around arrays of vm_page_t's to describe I/O &amp;nbsp;
&lt;br&gt;&amp;gt; buffers. &amp;nbsp;When
&lt;br&gt;&amp;gt; Poul, Peter, and I talked about it we figured we had a choice &amp;nbsp;
&lt;br&gt;&amp;gt; between passing
&lt;br&gt;&amp;gt; either the physical address or the vm_page_t. &amp;nbsp;However, not all &amp;nbsp;
&lt;br&gt;&amp;gt; physical
&lt;br&gt;&amp;gt; addresses have vm_page_t's, and it was deemed that GEOM's and disk &amp;nbsp;
&lt;br&gt;&amp;gt; drivers did
&lt;br&gt;&amp;gt; not need any properties of the vm_page_t aside from the physical &amp;nbsp;
&lt;br&gt;&amp;gt; address. &amp;nbsp;For
&lt;br&gt;&amp;gt; those reasons, sglist(9) uses physical addresses.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In general I think this is a good idea. &amp;nbsp;It'd be nice to work on
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; replacing
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the buf layer's implementation with something like this that could
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be used
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; directly by drivers. &amp;nbsp;Have you considered a busdma operation to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; load from
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a sglist?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So in regards to the bus_dma stuff, I did work on this a while ago
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; in my
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; jhb_bio branch. &amp;nbsp;I do have a bus_dmamap_load_sglist() and I had
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; planned on
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; using that in storage drivers directly. &amp;nbsp;However, I ended up
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; circling back
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to preferring a bus_dmamap_load_bio() and adding a new 'bio_start'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; field
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; to 'struct bio' that is an offset into an attached sglist.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I strongly disagree with forcing busdma to have intimate knowledge of
&lt;br&gt;&amp;gt;&amp;gt; bio's. &amp;nbsp;All of the needed information can be stored in sglist &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; headers.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The alternative is to teach every disk driver to handle the difference
&lt;br&gt;&amp;gt; as well as every GEOM module. &amp;nbsp;Not only that, but it doesn't provide &amp;nbsp;
&lt;br&gt;&amp;gt; any
&lt;br&gt;&amp;gt; easy transition path since you can't change any of the top-level code
&lt;br&gt;&amp;gt; to use an unmapped bio at until all the lower levels have been &amp;nbsp;
&lt;br&gt;&amp;gt; converted
&lt;br&gt;&amp;gt; to handle both ways. &amp;nbsp;Jeff had originally proposed having a
&lt;br&gt;&amp;gt; bus_dmamap_load_bio() and I tried to not use it but just have a
&lt;br&gt;&amp;gt; bus_dmamap_load_sglist() instead, but when I started looking at the &amp;nbsp;
&lt;br&gt;&amp;gt; extra
&lt;br&gt;&amp;gt; work that would have to be duplicated in every driver to handle both &amp;nbsp;
&lt;br&gt;&amp;gt; types
&lt;br&gt;&amp;gt; of bios, I concluded bus_dmamap_load_bio() would actually be a lot &amp;nbsp;
&lt;br&gt;&amp;gt; simpler.
&lt;/div&gt;&lt;br&gt;You completely missed the part of my email where I talk about not &amp;nbsp;
&lt;br&gt;having to update drivers for these new APIs.
&lt;br&gt;&lt;br&gt;In any case, I still respectfully disagree with your approach to &amp;nbsp;
&lt;br&gt;busdma and bio handling, and ask that you let Attilio and I work on &amp;nbsp;
&lt;br&gt;our prototype. &amp;nbsp;Once that's done, we can stop talking in hypotheticals.
&lt;br&gt;&lt;br&gt;Scott
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26582975&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26582975&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26582975.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26581836</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-30T13:03:46Z</published>
	<updated>2009-11-30T13:03:46Z</updated>
	<author>
		<name>Poul-Henning Kamp</name>
	</author>
	<content type="html">In message &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581836&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;200911301427.23166.jhb@...&lt;/a&gt;&amp;gt;, John Baldwin writes:
&lt;br&gt;&amp;gt;On Sunday 29 November 2009 6:27:49 pm Scott Long wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;It actually does get used by the nvidia driver, but so far in what I have
&lt;br&gt;&amp;gt;done in my jhb_bio branch I have tried several different approaches which
&lt;br&gt;&amp;gt;is why the API is as verbose as it is.
&lt;br&gt;&lt;br&gt;I would warn equally against rigorous simplification and gratuitous
&lt;br&gt;generalization in this, I've tried both approaches in prototypes and
&lt;br&gt;neither works out well from an API point of view.
&lt;br&gt;&lt;br&gt;The insight that expended CPU cycles are practially unmeasurable
&lt;br&gt;in this context should not be forgotten, even in the quest to
&lt;br&gt;get ever higher transactions per second numbers.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Poul-Henning Kamp &amp;nbsp; &amp;nbsp; &amp;nbsp; | UNIX since Zilog Zeus 3.20
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581836&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;phk@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | TCP/IP since RFC 956
&lt;br&gt;FreeBSD committer &amp;nbsp; &amp;nbsp; &amp;nbsp; | BSD since 4.3-tahoe &amp;nbsp; &amp;nbsp;
&lt;br&gt;Never attribute to malice what can adequately be explained by incompetence.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581836&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581836&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26581836.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26581757</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-30T11:27:23Z</published>
	<updated>2009-11-30T11:27:23Z</updated>
	<author>
		<name>jhb-3</name>
	</author>
	<content type="html">On Sunday 29 November 2009 6:27:49 pm Scott Long wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; On Wednesday 20 May 2009 2:49:30 pm Jeff Roberson wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Tue, 19 May 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; 2) I worry that if all users do sglist_count() followed by a dynamic
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; allocation and then an _append() they will be very expensive.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; pmap_kextract() is much more expensive than it may first seem to &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; be. &amp;nbsp;Do
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; you have a user of count already?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The only one that does now is sglist_build() and nothing currently &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; uses that.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Kinda silly to have it then. &amp;nbsp;I also don't see the point of it; if the &amp;nbsp;
&lt;br&gt;&amp;gt; point of the sglist object is to avoid VA mappings, then why start &amp;nbsp;
&lt;br&gt;&amp;gt; with a VA mapping? &amp;nbsp;But that aside, Jeff is correct, sglist_build() is &amp;nbsp;
&lt;br&gt;&amp;gt; horribly inefficient.
&lt;/div&gt;&lt;br&gt;It actually does get used by the nvidia driver, but so far in what I have
&lt;br&gt;done in my jhb_bio branch I have tried several different approaches which
&lt;br&gt;is why the API is as verbose as it is.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; VOP_GET/PUTPAGES would not need to do this since they could simply &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; append
&lt;br&gt;&amp;gt; &amp;gt; the physical addresses extracted directly from vm_page_t's for &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; example. &amp;nbsp;I'm
&lt;br&gt;&amp;gt; &amp;gt; not sure this will be used very much now as originally I thought I &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; would be
&lt;br&gt;&amp;gt; &amp;gt; changing all storage drivers to do all DMA operations using sglists &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; and this
&lt;br&gt;&amp;gt; &amp;gt; sort of thing would have been used for non-bio requests like firmware
&lt;br&gt;&amp;gt; &amp;gt; commands; however, as expounded on below, it actually appears better &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; to
&lt;br&gt;&amp;gt; &amp;gt; still treat bio's separate from non-bio requests for bus_dma so that &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; the
&lt;br&gt;&amp;gt; &amp;gt; non-bio requests can continue to use bus_dmamap_load_buffer() as &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; they do
&lt;br&gt;&amp;gt; &amp;gt; now.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I completely disagree with your approach to busdma, but I'll get into &amp;nbsp;
&lt;br&gt;&amp;gt; that later. &amp;nbsp;What I really don't understand is, why have yet another &amp;nbsp;
&lt;br&gt;&amp;gt; page description format? &amp;nbsp;Whether the I/O is disk buffers being pushed &amp;nbsp;
&lt;br&gt;&amp;gt; by a pager to a disk controller, or texture buffers being pushed to &amp;nbsp;
&lt;br&gt;&amp;gt; video hardware, they already have vm objects associated with them, &amp;nbsp;
&lt;br&gt;&amp;gt; no? &amp;nbsp;Why translate to an intermediate format? &amp;nbsp;I understand that &amp;nbsp;
&lt;br&gt;&amp;gt; you're creating another vm object format to deal directly with the &amp;nbsp;
&lt;br&gt;&amp;gt; needs of nvidia, but that's really a one-off case right now. &amp;nbsp;What &amp;nbsp;
&lt;br&gt;&amp;gt; about when we want the pagedaemon to push unmapped i/o? &amp;nbsp;Will it have &amp;nbsp;
&lt;br&gt;&amp;gt; to spend cycles translating its objects to sglists? &amp;nbsp;This is really a &amp;nbsp;
&lt;br&gt;&amp;gt; larger question that I'm not prepared to answer, but would like to &amp;nbsp;
&lt;br&gt;&amp;gt; discuss.
&lt;/div&gt;&lt;br&gt;Textures do not already have objects associated, no. &amp;nbsp;However, I did not
&lt;br&gt;design sglist with Nvidia in mind. &amp;nbsp;I hacked on it in conjunction with
&lt;br&gt;phk@, gibbs@, and jeff@ to work on unmapped bio support. &amp;nbsp;That was the
&lt;br&gt;only motivation for sglist(9). &amp;nbsp;Only the OBJT_SG bits were specific to
&lt;br&gt;Nvidia and that was added as an afterthought because sglist(9) already
&lt;br&gt;existed in the jhb_bio branch.
&lt;br&gt;&lt;br&gt;If you look at GETPAGES/PUTPAGES they already deal in terms of vm_page_t's,
&lt;br&gt;not VM objects, and vm_page_t's already provide a linear time way of fetching
&lt;br&gt;the physical address (m-&amp;gt;phys_addr), so generating an sglist for GETPAGES and
&lt;br&gt;PUTPAGES will be very cheap. &amp;nbsp;One of the original proposals from phk@ was
&lt;br&gt;actually to pass around arrays of vm_page_t's to describe I/O buffers. &amp;nbsp;When
&lt;br&gt;Poul, Peter, and I talked about it we figured we had a choice between passing
&lt;br&gt;either the physical address or the vm_page_t. &amp;nbsp;However, not all physical
&lt;br&gt;addresses have vm_page_t's, and it was deemed that GEOM's and disk drivers did
&lt;br&gt;not need any properties of the vm_page_t aside from the physical address. &amp;nbsp;For
&lt;br&gt;those reasons, sglist(9) uses physical addresses.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; In general I think this is a good idea. &amp;nbsp;It'd be nice to work on &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; replacing
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the buf layer's implementation with something like this that could &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; be used
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; directly by drivers. &amp;nbsp;Have you considered a busdma operation to &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; load from
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; a sglist?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So in regards to the bus_dma stuff, I did work on this a while ago &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; in my
&lt;br&gt;&amp;gt; &amp;gt; jhb_bio branch. &amp;nbsp;I do have a bus_dmamap_load_sglist() and I had &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; planned on
&lt;br&gt;&amp;gt; &amp;gt; using that in storage drivers directly. &amp;nbsp;However, I ended up &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; circling back
&lt;br&gt;&amp;gt; &amp;gt; to preferring a bus_dmamap_load_bio() and adding a new 'bio_start' &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; field
&lt;br&gt;&amp;gt; &amp;gt; to 'struct bio' that is an offset into an attached sglist.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I strongly disagree with forcing busdma to have intimate knowledge of &amp;nbsp;
&lt;br&gt;&amp;gt; bio's. &amp;nbsp;All of the needed information can be stored in sglist headers.
&lt;/div&gt;&lt;br&gt;The alternative is to teach every disk driver to handle the difference
&lt;br&gt;as well as every GEOM module. &amp;nbsp;Not only that, but it doesn't provide any
&lt;br&gt;easy transition path since you can't change any of the top-level code
&lt;br&gt;to use an unmapped bio at until all the lower levels have been converted
&lt;br&gt;to handle both ways. &amp;nbsp;Jeff had originally proposed having a
&lt;br&gt;bus_dmamap_load_bio() and I tried to not use it but just have a
&lt;br&gt;bus_dmamap_load_sglist() instead, but when I started looking at the extra
&lt;br&gt;work that would have to be duplicated in every driver to handle both types
&lt;br&gt;of bios, I concluded bus_dmamap_load_bio() would actually be a lot simpler.
&lt;br&gt;&amp;nbsp;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;This let me
&lt;br&gt;&amp;gt; &amp;gt; carve up I/O requests in geom_dev to satisfy a disk device's max &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; request
&lt;br&gt;&amp;gt; &amp;gt; size while still sharing the same read-only sglist across the various
&lt;br&gt;&amp;gt; &amp;gt; BIO's (by simply adjusting bio_length and bio_start to be a subrange &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; of
&lt;br&gt;&amp;gt; &amp;gt; the sglist) as opposed to doing memory allocations to allocate &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; specific
&lt;br&gt;&amp;gt; &amp;gt; ranges of an sglist (using something like sglist_slice()) for each I/O
&lt;br&gt;&amp;gt; &amp;gt; request.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think this is fundamentally wrong. &amp;nbsp;You're proposing exchanging a &amp;nbsp;
&lt;br&gt;&amp;gt; cheap operation of splitting VA's with an expensive operation of &amp;nbsp;
&lt;br&gt;&amp;gt; allocating, splitting, copying, and refcounting sglists. &amp;nbsp;Splitting is &amp;nbsp;
&lt;br&gt;&amp;gt; an excessively common operation, and your proposal will impact &amp;nbsp;
&lt;br&gt;&amp;gt; performance as storage becomes exponentially faster.
&lt;/div&gt;&lt;br&gt;The whole point is to not do anything to the sglist when splitting up requests 
&lt;br&gt;so that it is more efficient. &amp;nbsp;I wrote above that splitting up the sglist 
&lt;br&gt;would require allocations and be slow, so I specifically avoided that. &amp;nbsp;
&lt;br&gt;Instead, one just does a simple refcount bump (refcount_acquire()) when 
&lt;br&gt;cloning the bio (which is already doing an allocation to get the new bio) and 
&lt;br&gt;one does a simple 'bio-&amp;gt;bio_start += X' where one already does
&lt;br&gt;bio-&amp;gt;bio_data += X' now.
&lt;br&gt;&lt;br&gt;Instead, the sglist describes the &amp;quot;large&amp;quot; buffer at the &amp;quot;top&amp;quot; of the
&lt;br&gt;I/O request tree, and when you split up the large bio into smaller ones
&lt;br&gt;you simply use bio_start and bio_length to specify the sub-range of the
&lt;br&gt;buffer.
&lt;br&gt;&lt;br&gt;&amp;gt; We need to stop thinking about maxio as a roadbump at the bottom of &amp;nbsp;
&lt;br&gt;&amp;gt; the storage stack, and instead think of it as a fundamental attribute &amp;nbsp;
&lt;br&gt;&amp;gt; that is honored at the top when a BIO is created. &amp;nbsp;Instead of loading &amp;nbsp;
&lt;br&gt;&amp;gt; up an sglist with all of the pages (and don't forget coalesced pages &amp;nbsp;
&lt;br&gt;&amp;gt; that might need to be broken up), maybe multiple bio's are created &amp;nbsp;
&lt;br&gt;&amp;gt; that honor maxio from the start, or a single bio with a chained &amp;nbsp;
&lt;br&gt;&amp;gt; sglist, with each chain link honoring maxio, allowing for easy &amp;nbsp;
&lt;br&gt;&amp;gt; splitting.
&lt;br&gt;&lt;br&gt;It may be that the splitting that geom_dev does is done at the wrong layer;
&lt;br&gt;I'm not debating that. :) &amp;nbsp;I attempted to make sglist work efficiently with
&lt;br&gt;what is there now and other things like striping will also want to use cheap
&lt;br&gt;splitting of buffers.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;I then have bus_dmamap_load_bio() use the subrange of the
&lt;br&gt;&amp;gt; &amp;gt; sglist internally or fall back to using the KVA pointer if the sglist
&lt;br&gt;&amp;gt; &amp;gt; isn't present.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I completely disagree. &amp;nbsp;Drivers already deal with the details of &amp;nbsp;
&lt;br&gt;&amp;gt; bio's, and should continue to do so. &amp;nbsp;If a driver gets a bio that has &amp;nbsp;
&lt;br&gt;&amp;gt; a valid bio_data pointer, it should call bus_dmamap_load(). &amp;nbsp;If it &amp;nbsp;
&lt;br&gt;&amp;gt; get's one with a valid sglist, it should call bus_dmamap_load_sglist 
&lt;br&gt;&amp;gt; (). &amp;nbsp;Your proposal means that every storage driver in the system will &amp;nbsp;
&lt;br&gt;&amp;gt; have to change to use bus_dmamap_load_bio(). &amp;nbsp;It's not a big change, &amp;nbsp;
&lt;br&gt;&amp;gt; but it's disruptive both in the tree and out. &amp;nbsp;Your proposal also &amp;nbsp;
&lt;br&gt;&amp;gt; implies that CAM will have to start carrying BIO's in CCBs and passing &amp;nbsp;
&lt;br&gt;&amp;gt; them to their SIMs. &amp;nbsp;I absolutely disagree with this.
&lt;/div&gt;&lt;br&gt;Ok. &amp;nbsp;As I mentioned above, while this does add churn, I think it is less
&lt;br&gt;churn than changing all the drivers to handle the two different types of
&lt;br&gt;bio requests. &amp;nbsp;I also think it is much less friendly to doing the unmapped
&lt;br&gt;I/O changes in stages that allows the work to progress in parallel in
&lt;br&gt;different areas. &amp;nbsp;I also believe I specifically mentioned changing CCBs to
&lt;br&gt;pass the bio instead of the raw (data, length) pair when I discussed this
&lt;br&gt;with folks earlier.
&lt;br&gt;&lt;br&gt;&amp;gt; If we keep unneeded complications out of busdma, we avoid a lot of &amp;nbsp;
&lt;br&gt;&amp;gt; churn. &amp;nbsp;We also leave the busdma interface available for other forms &amp;nbsp;
&lt;br&gt;&amp;gt; of I/O without requiring more specific APi additions to accommodate &amp;nbsp;
&lt;br&gt;&amp;gt; them. &amp;nbsp;What about unmapped network i/o coming from something like &amp;nbsp;
&lt;br&gt;&amp;gt; sendfile?
&lt;br&gt;&lt;br&gt;I do have a bus_dmamap_load_sglist() in my tree already. &amp;nbsp;Do note that we
&lt;br&gt;already have bus_dmamap_load_mbuf() and bus_dmamap_load_uio(), so there is
&lt;br&gt;precedent for letting bus_dma handle slightly more complex data structures
&lt;br&gt;than just a (buffer, length) pair.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; However, I'm not really trying to get the bio stuff into the tree, &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; this
&lt;br&gt;&amp;gt; &amp;gt; is mostly for the Nvidia case and for that use case the driver is &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; simply
&lt;br&gt;&amp;gt; &amp;gt; creating simple single-entry lists and using sglist_append_phys().
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Designing the whole API around a single driver that we can't even get &amp;nbsp;
&lt;br&gt;&amp;gt; the source to makes it hard to evaluate the API.
&lt;br&gt;&lt;br&gt;The API was designed for the bio stuff, and not for any specific driver. &amp;nbsp;The 
&lt;br&gt;Nvidia stuff was only done as an afterthought because the sglist(9) structure 
&lt;br&gt;already existed at the time. &amp;nbsp;It was also designed as a result of the 
&lt;br&gt;discussions among several people and not completely in a vacuum.
&lt;br&gt;&lt;br&gt;&amp;gt; Attilio and I have spoken about this in private and will begin work on &amp;nbsp;
&lt;br&gt;&amp;gt; a prototype. &amp;nbsp;Here is the outline of what we're going to do:
&lt;br&gt;&lt;br&gt;For those playing along at home, the things that I suggested to Attilio as far
&lt;br&gt;as the next steps that I would do were to add the following APIs and then make
&lt;br&gt;the necessary changes so that drivers and GEOM modules use these:
&lt;br&gt;&lt;br&gt;- bus_dmamap_load_bio(): &amp;nbsp;Fairly simple. &amp;nbsp;Just takes a bio instead of (buffer,
&lt;br&gt;&amp;nbsp; length).
&lt;br&gt;- bio_adjust(): &amp;nbsp;This is a lot like m_adj() but for bio's instead of mbuf's.
&lt;br&gt;&amp;nbsp; It can be inline, but the point is to have GEOM modules use this to split up
&lt;br&gt;&amp;nbsp; a bio buffer instead of directly manipulating bio_data and bio_length
&lt;br&gt;&amp;nbsp; (possibly bio_offset as well).
&lt;br&gt;&lt;br&gt;Once these changes are done, adding support for simple unmapped bio's
&lt;br&gt;consists of adding sglist support to bus_dma for each architecture and
&lt;br&gt;bus_dmamap_load_bio() on each arch. &amp;nbsp;Then upper layer code could start using
&lt;br&gt;unmapped bios after that (I had hacky prototype changes to physio).
&lt;br&gt;&lt;br&gt;There would still be several big things to work out, such as GEOM modules
&lt;br&gt;that need to manipulate the data and not just pass it through. &amp;nbsp;phk's
&lt;br&gt;suggestion here was to have the driver or GEOM module fail the request with a
&lt;br&gt;magic error code. &amp;nbsp;The originator was then supposed to map the buffer and
&lt;br&gt;retry the request. &amp;nbsp;Presumably one could note the first time a given device
&lt;br&gt;object failed a request that way and always send down mapped requests
&lt;br&gt;afterwards to avoid delays in subsequent I/O requests. &amp;nbsp;There are other ways
&lt;br&gt;of handling this problem as well I imagine. &amp;nbsp;I have not made any attempt to
&lt;br&gt;solve this problem.
&lt;br&gt;&lt;br&gt;Also, the changes Jeff has discussed with regards to tearing up
&lt;br&gt;getpages/putpages and the buffer cache in general to take advantage of
&lt;br&gt;unmapped bios are a separate animal that would build on this stuff further.
&lt;br&gt;I have not made any attempt at this either.
&lt;br&gt;&lt;br&gt;I do find the idea of chaining sglist's together interesting. &amp;nbsp;It would lose
&lt;br&gt;one of the &amp;quot;benefits&amp;quot; of the current layout which is that the segment array is
&lt;br&gt;ABI-compatible with bus_dma's S/G list format so that in the common case the
&lt;br&gt;sglist that physio or getpages/putpages would generate could be passed 
&lt;br&gt;directly to the device driver's bus_dma callback without having to generate an
&lt;br&gt;intermediate data structure.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Baldwin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581757&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26581757&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26581757.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26580338</id>
	<title>Re: [PATCH] Statclock aliasing by LAPIC</title>
	<published>2009-11-30T10:05:30Z</published>
	<updated>2009-11-30T10:05:30Z</updated>
	<author>
		<name>jhb-3</name>
	</author>
	<content type="html">On Friday 27 November 2009 6:42:50 pm Attilio Rao wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Handling all the three clocks (hardclock, softclock, profclock) within
&lt;br&gt;&amp;gt; the LAPIC can lead to aliasing for the softclock and profclock because
&lt;br&gt;&amp;gt; hz is sized to fit mainly hardclock. The fashion to handle all of them
&lt;br&gt;&amp;gt; within the LAPIC was introduced in 2005 and before than the softclock
&lt;br&gt;&amp;gt; and profclock were supposed to be handled in the rtc. Right now, too,
&lt;br&gt;&amp;gt; there is the necessary support to handle profclock and statclock in
&lt;br&gt;&amp;gt; atrtc which gets enabled if the LAPIC signals it can't take in charge
&lt;br&gt;&amp;gt; the three clocks.
&lt;br&gt;&amp;gt; The proposed patch reverts the situation preferring the atrtc to
&lt;br&gt;&amp;gt; handle the statclock and profclock (then a different source from the
&lt;br&gt;&amp;gt; LAPIC) and then avoid the aliasing problem:
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;a href=&quot;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&lt;/a&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In this patch, lapic_setup_clock() has been changed in order to return
&lt;br&gt;&amp;gt; a three-states variable which identified if the LAPIC got in charge
&lt;br&gt;&amp;gt; all the three clocks, just the hardclock or none of them (the current
&lt;br&gt;&amp;gt; situation is just none/all) and the rtc handling runs subsequently.
&lt;br&gt;&amp;gt; A tunable as been added to force LAPI to get in charge all the three
&lt;br&gt;&amp;gt; clocks if needed.
&lt;br&gt;&amp;gt; In ia32 atrtc compiling is linked to atpic compiling, so a compile
&lt;br&gt;&amp;gt; time flag has been added to check if atpic is not present and in case
&lt;br&gt;&amp;gt; force LAPIC to take in charge all the three clocks (which is still
&lt;br&gt;&amp;gt; better than the 'safe belt values' still present in the rtc code).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please note that statclock and profclock are widely used in our kernel
&lt;br&gt;&amp;gt; (rusage is, for example, statclock driven) and fixing this would
&lt;br&gt;&amp;gt; result in specific improvements (as a several-reported wrong CPU usage
&lt;br&gt;&amp;gt; statistic in top).
&lt;br&gt;&amp;gt; This bug has been found by Sandvine Incorporated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Reviews, comments and testing are welcome.
&lt;/div&gt;&lt;br&gt;Presumably in the RTC case lapic_timer_hz should always be hz and not some 
&lt;br&gt;multiple of hz. &amp;nbsp;Also, did you check to make sure all the lock is present? &amp;nbsp;I 
&lt;br&gt;think at one point I changed the locking for the RTC and/or ISA timer to just 
&lt;br&gt;use critical_enter/exit so that UP machines running an SMP kernel wouldn't pay 
&lt;br&gt;the locking overhead since the code was only used on UP machines. &amp;nbsp;It may very 
&lt;br&gt;well be that I only changed that in a development branch though and not in 
&lt;br&gt;HEAD.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Baldwin
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580338&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26580338&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Statclock-aliasing-by-LAPIC-tp26549185p26580338.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26572906</id>
	<title>Current problem reports assigned to freebsd-arch@FreeBSD.org</title>
	<published>2009-11-30T03:06:47Z</published>
	<updated>2009-11-30T03:06:47Z</updated>
	<author>
		<name>FreeBSD bugmaster</name>
	</author>
	<content type="html">Note: to view an individual PR, use:
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/cgi/query-pr.cgi?pr=(number&lt;/a&gt;).
&lt;br&gt;&lt;br&gt;The following is a listing of current problems submitted by FreeBSD users.
&lt;br&gt;These represent problem reports covering all versions including
&lt;br&gt;experimental development code and obsolete releases.
&lt;br&gt;&lt;br&gt;&lt;br&gt;S Tracker &amp;nbsp; &amp;nbsp; &amp;nbsp;Resp. &amp;nbsp; &amp;nbsp; &amp;nbsp;Description
&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;o kern/120749 &amp;nbsp;arch &amp;nbsp; &amp;nbsp; &amp;nbsp; [request] Suggest upping the default kern.ps_arg_cache
&lt;br&gt;&lt;br&gt;1 problem total.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26572906&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26572906&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Current-problem-reports-assigned-to-freebsd-arch%40FreeBSD.org-tp26572906p26572906.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26568113</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-29T16:47:08Z</published>
	<updated>2009-11-29T16:47:08Z</updated>
	<author>
		<name>Scott Long-2</name>
	</author>
	<content type="html">On Nov 29, 2009, at 5:40 PM, Scott Long wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Nov 29, 2009, at 5:06 PM, Julian Elischer wrote:
&lt;br&gt;&amp;gt;&amp;gt; Scott Long wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I think this is fundamentally wrong. &amp;nbsp;You're proposing exchanging &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a cheap operation of splitting VA's with an expensive operation of &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; allocating, splitting, copying, and refcounting sglists. &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Splitting is an excessively common operation, and your proposal &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; will impact performance as storage becomes exponentially faster.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; From the perspective of a flashdrive driver the more
&lt;br&gt;&amp;gt;&amp;gt; efficient the better. The current generation of devices are
&lt;br&gt;&amp;gt;&amp;gt; doing 800MB/sec (6.4Gb/sec) of scattter-gather random IO
&lt;br&gt;&amp;gt;&amp;gt; and really that will only go up. We are doing over 130,000 &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; independent
&lt;br&gt;&amp;gt;&amp;gt; transactions per second and we can put multiple drives in a single
&lt;br&gt;&amp;gt;&amp;gt; machine.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; These numbers will only increase with future developments.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; MB/s doesn't tell me much other than the memory bandwidth of the &amp;nbsp;
&lt;br&gt;&amp;gt; pathways (and that that DMA engines involved don't completely &amp;nbsp;
&lt;br&gt;&amp;gt; suck). &amp;nbsp;What about transactions/sec? &amp;nbsp;That tells me a lot more about &amp;nbsp;
&lt;br&gt;&amp;gt; the efficiency of the OS, drivers, and firmware, as well as latency.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Bah, the answer was right in front of me, sorry =-) &amp;nbsp;130k is impressive.
&lt;br&gt;&lt;br&gt;Scott
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568113&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568113&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26568113.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26568054</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-29T16:40:12Z</published>
	<updated>2009-11-29T16:40:12Z</updated>
	<author>
		<name>Scott Long-2</name>
	</author>
	<content type="html">On Nov 29, 2009, at 5:06 PM, Julian Elischer wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Scott Long wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I think this is fundamentally wrong. &amp;nbsp;You're proposing exchanging a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; cheap operation of splitting VA's with an expensive operation of &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; allocating, splitting, copying, and refcounting sglists. &amp;nbsp;Splitting &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; is an excessively common operation, and your proposal will impact &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; performance as storage becomes exponentially faster.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; From the perspective of a flashdrive driver the more
&lt;br&gt;&amp;gt; efficient the better. The current generation of devices are
&lt;br&gt;&amp;gt; doing 800MB/sec (6.4Gb/sec) of scattter-gather random IO
&lt;br&gt;&amp;gt; and really that will only go up. We are doing over 130,000 independent
&lt;br&gt;&amp;gt; transactions per second and we can put multiple drives in a single
&lt;br&gt;&amp;gt; machine.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; These numbers will only increase with future developments.
&lt;/div&gt;&lt;br&gt;MB/s doesn't tell me much other than the memory bandwidth of the &amp;nbsp;
&lt;br&gt;pathways (and that that DMA engines involved don't completely suck). &amp;nbsp; 
&lt;br&gt;What about transactions/sec? &amp;nbsp;That tells me a lot more about the &amp;nbsp;
&lt;br&gt;efficiency of the OS, drivers, and firmware, as well as latency.
&lt;br&gt;&lt;br&gt;Scott
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568054&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568054&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26568054.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26567821</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-29T16:06:02Z</published>
	<updated>2009-11-29T16:06:02Z</updated>
	<author>
		<name>Julian Elischer</name>
	</author>
	<content type="html">Scott Long wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I think this is fundamentally wrong. &amp;nbsp;You're proposing exchanging a 
&lt;br&gt;&amp;gt; cheap operation of splitting VA's with an expensive operation of 
&lt;br&gt;&amp;gt; allocating, splitting, copying, and refcounting sglists. &amp;nbsp;Splitting is 
&lt;br&gt;&amp;gt; an excessively common operation, and your proposal will impact 
&lt;br&gt;&amp;gt; performance as storage becomes exponentially faster.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&amp;nbsp;From the perspective of a flashdrive driver the more
&lt;br&gt;efficient the better. The current generation of devices are
&lt;br&gt;doing 800MB/sec (6.4Gb/sec) of scattter-gather random IO
&lt;br&gt;and really that will only go up. We are doing over 130,000 independent
&lt;br&gt;transactions per second and we can put multiple drives in a single
&lt;br&gt;machine.
&lt;br&gt;&lt;br&gt;These numbers will only increase with future developments.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26567821&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26567821&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26567821.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26567679</id>
	<title>Re: sglist(9)</title>
	<published>2009-11-29T15:27:49Z</published>
	<updated>2009-11-29T15:27:49Z</updated>
	<author>
		<name>Scott Long-2</name>
	</author>
	<content type="html">John,
&lt;br&gt;&lt;br&gt;Sorry for the late reply on this. &amp;nbsp;Attilio approached me recently &amp;nbsp;
&lt;br&gt;about moving busdma and storage to sglists; up until then I had &amp;nbsp;
&lt;br&gt;largely ignored this conversation because I thought that it was only &amp;nbsp;
&lt;br&gt;about the nvidia driver.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wednesday 20 May 2009 2:49:30 pm Jeff Roberson wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Tue, 19 May 2009, John Baldwin wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2) I worry that if all users do sglist_count() followed by a dynamic
&lt;br&gt;&amp;gt;&amp;gt; allocation and then an _append() they will be very expensive.
&lt;br&gt;&amp;gt;&amp;gt; pmap_kextract() is much more expensive than it may first seem to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; be. &amp;nbsp;Do
&lt;br&gt;&amp;gt;&amp;gt; you have a user of count already?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The only one that does now is sglist_build() and nothing currently &amp;nbsp;
&lt;br&gt;&amp;gt; uses that.
&lt;/div&gt;&lt;br&gt;Kinda silly to have it then. &amp;nbsp;I also don't see the point of it; if the &amp;nbsp;
&lt;br&gt;point of the sglist object is to avoid VA mappings, then why start &amp;nbsp;
&lt;br&gt;with a VA mapping? &amp;nbsp;But that aside, Jeff is correct, sglist_build() is &amp;nbsp;
&lt;br&gt;horribly inefficient.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; VOP_GET/PUTPAGES would not need to do this since they could simply &amp;nbsp;
&lt;br&gt;&amp;gt; append
&lt;br&gt;&amp;gt; the physical addresses extracted directly from vm_page_t's for &amp;nbsp;
&lt;br&gt;&amp;gt; example. &amp;nbsp;I'm
&lt;br&gt;&amp;gt; not sure this will be used very much now as originally I thought I &amp;nbsp;
&lt;br&gt;&amp;gt; would be
&lt;br&gt;&amp;gt; changing all storage drivers to do all DMA operations using sglists &amp;nbsp;
&lt;br&gt;&amp;gt; and this
&lt;br&gt;&amp;gt; sort of thing would have been used for non-bio requests like firmware
&lt;br&gt;&amp;gt; commands; however, as expounded on below, it actually appears better &amp;nbsp;
&lt;br&gt;&amp;gt; to
&lt;br&gt;&amp;gt; still treat bio's separate from non-bio requests for bus_dma so that &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; non-bio requests can continue to use bus_dmamap_load_buffer() as &amp;nbsp;
&lt;br&gt;&amp;gt; they do
&lt;br&gt;&amp;gt; now.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;I completely disagree with your approach to busdma, but I'll get into &amp;nbsp;
&lt;br&gt;that later. &amp;nbsp;What I really don't understand is, why have yet another &amp;nbsp;
&lt;br&gt;page description format? &amp;nbsp;Whether the I/O is disk buffers being pushed &amp;nbsp;
&lt;br&gt;by a pager to a disk controller, or texture buffers being pushed to &amp;nbsp;
&lt;br&gt;video hardware, they already have vm objects associated with them, &amp;nbsp;
&lt;br&gt;no? &amp;nbsp;Why translate to an intermediate format? &amp;nbsp;I understand that &amp;nbsp;
&lt;br&gt;you're creating another vm object format to deal directly with the &amp;nbsp;
&lt;br&gt;needs of nvidia, but that's really a one-off case right now. &amp;nbsp;What &amp;nbsp;
&lt;br&gt;about when we want the pagedaemon to push unmapped i/o? &amp;nbsp;Will it have &amp;nbsp;
&lt;br&gt;to spend cycles translating its objects to sglists? &amp;nbsp;This is really a &amp;nbsp;
&lt;br&gt;larger question that I'm not prepared to answer, but would like to &amp;nbsp;
&lt;br&gt;discuss.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; 3) Rather than having sg_segs be an actual pointer, did you consider
&lt;br&gt;&amp;gt;&amp;gt; making it an unsized array? &amp;nbsp;This removes the overhead of one &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; pointer from
&lt;br&gt;&amp;gt;&amp;gt; the structure while enforcing that it's always contiguously &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; allocated.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's actually a feature to be able to have the header in separate &amp;nbsp;
&lt;br&gt;&amp;gt; storage from
&lt;br&gt;&amp;gt; segs array. &amp;nbsp;I use this in the jhb_bio branch in the bus_dma &amp;nbsp;
&lt;br&gt;&amp;gt; implementations
&lt;br&gt;&amp;gt; where a pre-allocated segs array is stored in the bus dma tag and &amp;nbsp;
&lt;br&gt;&amp;gt; the header
&lt;br&gt;&amp;gt; is allocated on the stack.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;I'd like to take this one step further. &amp;nbsp;Instead of sglists being &amp;nbsp;
&lt;br&gt;exactly sized, I'd like to see them be much more like mbufs, with a &amp;nbsp;
&lt;br&gt;header and static storage, maybe somewhere between 128b and 1k in &amp;nbsp;
&lt;br&gt;total size. &amp;nbsp;Then they can be allocated and managed in pools, and &amp;nbsp;
&lt;br&gt;chained together to make for easy appending, splitting, and growing. &amp;nbsp; 
&lt;br&gt;Offset pointers can be stored in the header instead of externally. &amp;nbsp; 
&lt;br&gt;Also, there are a lot of failure points in the API regarding to the &amp;nbsp;
&lt;br&gt;sglist object being too small. &amp;nbsp;Those need to be fixed.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; 4) SGLIST_INIT might be better off as an inline, and may not even &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; belong
&lt;br&gt;&amp;gt;&amp;gt; in the header file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That may be true. &amp;nbsp;I currently only use it in the jhb_bio branch for &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; bus_dma implementations.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In general I think this is a good idea. &amp;nbsp;It'd be nice to work on &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; replacing
&lt;br&gt;&amp;gt;&amp;gt; the buf layer's implementation with something like this that could &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; be used
&lt;br&gt;&amp;gt;&amp;gt; directly by drivers. &amp;nbsp;Have you considered a busdma operation to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; load from
&lt;br&gt;&amp;gt;&amp;gt; a sglist?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So in regards to the bus_dma stuff, I did work on this a while ago &amp;nbsp;
&lt;br&gt;&amp;gt; in my
&lt;br&gt;&amp;gt; jhb_bio branch. &amp;nbsp;I do have a bus_dmamap_load_sglist() and I had &amp;nbsp;
&lt;br&gt;&amp;gt; planned on
&lt;br&gt;&amp;gt; using that in storage drivers directly. &amp;nbsp;However, I ended up &amp;nbsp;
&lt;br&gt;&amp;gt; circling back
&lt;br&gt;&amp;gt; to preferring a bus_dmamap_load_bio() and adding a new 'bio_start' &amp;nbsp;
&lt;br&gt;&amp;gt; field
&lt;br&gt;&amp;gt; to 'struct bio' that is an offset into an attached sglist.
&lt;/div&gt;&lt;br&gt;I strongly disagree with forcing busdma to have intimate knowledge of &amp;nbsp;
&lt;br&gt;bio's. &amp;nbsp;All of the needed information can be stored in sglist headers.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;This let me
&lt;br&gt;&amp;gt; carve up I/O requests in geom_dev to satisfy a disk device's max &amp;nbsp;
&lt;br&gt;&amp;gt; request
&lt;br&gt;&amp;gt; size while still sharing the same read-only sglist across the various
&lt;br&gt;&amp;gt; BIO's (by simply adjusting bio_length and bio_start to be a subrange &amp;nbsp;
&lt;br&gt;&amp;gt; of
&lt;br&gt;&amp;gt; the sglist) as opposed to doing memory allocations to allocate &amp;nbsp;
&lt;br&gt;&amp;gt; specific
&lt;br&gt;&amp;gt; ranges of an sglist (using something like sglist_slice()) for each I/O
&lt;br&gt;&amp;gt; request.
&lt;/div&gt;&lt;br&gt;I think this is fundamentally wrong. &amp;nbsp;You're proposing exchanging a &amp;nbsp;
&lt;br&gt;cheap operation of splitting VA's with an expensive operation of &amp;nbsp;
&lt;br&gt;allocating, splitting, copying, and refcounting sglists. &amp;nbsp;Splitting is &amp;nbsp;
&lt;br&gt;an excessively common operation, and your proposal will impact &amp;nbsp;
&lt;br&gt;performance as storage becomes exponentially faster.
&lt;br&gt;&lt;br&gt;We need to stop thinking about maxio as a roadbump at the bottom of &amp;nbsp;
&lt;br&gt;the storage stack, and instead think of it as a fundamental attribute &amp;nbsp;
&lt;br&gt;that is honored at the top when a BIO is created. &amp;nbsp;Instead of loading &amp;nbsp;
&lt;br&gt;up an sglist with all of the pages (and don't forget coalesced pages &amp;nbsp;
&lt;br&gt;that might need to be broken up), maybe multiple bio's are created &amp;nbsp;
&lt;br&gt;that honor maxio from the start, or a single bio with a chained &amp;nbsp;
&lt;br&gt;sglist, with each chain link honoring maxio, allowing for easy &amp;nbsp;
&lt;br&gt;splitting.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;I then have bus_dmamap_load_bio() use the subrange of the
&lt;br&gt;&amp;gt; sglist internally or fall back to using the KVA pointer if the sglist
&lt;br&gt;&amp;gt; isn't present.
&lt;br&gt;&lt;br&gt;I completely disagree. &amp;nbsp;Drivers already deal with the details of &amp;nbsp;
&lt;br&gt;bio's, and should continue to do so. &amp;nbsp;If a driver gets a bio that has &amp;nbsp;
&lt;br&gt;a valid bio_data pointer, it should call bus_dmamap_load(). &amp;nbsp;If it &amp;nbsp;
&lt;br&gt;get's one with a valid sglist, it should call bus_dmamap_load_sglist 
&lt;br&gt;(). &amp;nbsp;Your proposal means that every storage driver in the system will &amp;nbsp;
&lt;br&gt;have to change to use bus_dmamap_load_bio(). &amp;nbsp;It's not a big change, &amp;nbsp;
&lt;br&gt;but it's disruptive both in the tree and out. &amp;nbsp;Your proposal also &amp;nbsp;
&lt;br&gt;implies that CAM will have to start carrying BIO's in CCBs and passing &amp;nbsp;
&lt;br&gt;them to their SIMs. &amp;nbsp;I absolutely disagree with this.
&lt;br&gt;&lt;br&gt;If we keep unneeded complications out of busdma, we avoid a lot of &amp;nbsp;
&lt;br&gt;churn. &amp;nbsp;We also leave the busdma interface available for other forms &amp;nbsp;
&lt;br&gt;of I/O without requiring more specific APi additions to accommodate &amp;nbsp;
&lt;br&gt;them. &amp;nbsp;What about unmapped network i/o coming from something like &amp;nbsp;
&lt;br&gt;sendfile?
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, I'm not really trying to get the bio stuff into the tree, &amp;nbsp;
&lt;br&gt;&amp;gt; this
&lt;br&gt;&amp;gt; is mostly for the Nvidia case and for that use case the driver is &amp;nbsp;
&lt;br&gt;&amp;gt; simply
&lt;br&gt;&amp;gt; creating simple single-entry lists and using sglist_append_phys().
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Designing the whole API around a single driver that we can't even get &amp;nbsp;
&lt;br&gt;the source to makes it hard to evaluate the API.
&lt;br&gt;&lt;br&gt;Attilio and I have spoken about this in private and will begin work on &amp;nbsp;
&lt;br&gt;a prototype. &amp;nbsp;Here is the outline of what we're going to do:
&lt;br&gt;&lt;br&gt;1. Change struct sglist as so:
&lt;br&gt;&amp;nbsp; &amp;nbsp;a. Uniform size
&lt;br&gt;&amp;nbsp; &amp;nbsp;b. Determine an optimal number of elements to include in the size &amp;nbsp;
&lt;br&gt;(waving my hands here, more research is needed).
&lt;br&gt;&amp;nbsp; &amp;nbsp;c. Chain, offset, and length pointers, very similar to how mbufs &amp;nbsp;
&lt;br&gt;already work
&lt;br&gt;2. &amp;nbsp;Expand the sglist API so that I/O producers can allocate slabs of &amp;nbsp;
&lt;br&gt;sglists and slice them up into pools that they can manage and own
&lt;br&gt;3. &amp;nbsp;Add an sglist field to struct bio, and add appropriate flags to &amp;nbsp;
&lt;br&gt;identify VA vs sglist operation
&lt;br&gt;4. &amp;nbsp;Extend the CAM_DATA_PHYS attributes in CAM to handle sglists.
&lt;br&gt;5. &amp;nbsp;Add bus_dmamap_load_sglist(). &amp;nbsp;This will be able to walk chains &amp;nbsp;
&lt;br&gt;and combine, split, and reassign segments as needed.
&lt;br&gt;6. &amp;nbsp;Modify a select number of drivers to use it.
&lt;br&gt;7. &amp;nbsp;Add a flag to disk-&amp;gt;d_flags to signal if a driver can handle &amp;nbsp;
&lt;br&gt;sglists. &amp;nbsp;Have geom_dev look at this flag and generate a &amp;nbsp;
&lt;br&gt;kmem_alloc_nofault+pmap_kenter sequence for drivers that can't support &amp;nbsp;
&lt;br&gt;it.
&lt;br&gt;&lt;br&gt;In the end, no drivers will need to change, but the ones that do &amp;nbsp;
&lt;br&gt;change will obviously benefit. &amp;nbsp;We're going to prototype this will an &amp;nbsp;
&lt;br&gt;i/o source that starts unmapped (via the Xen blkback driver). &amp;nbsp;The &amp;nbsp;
&lt;br&gt;downside is that most GEOM transforms that need to touch the data &amp;nbsp;
&lt;br&gt;won't work, but that's something that can be addressed once the &amp;nbsp;
&lt;br&gt;prototype is done and evaluated.
&lt;br&gt;&lt;br&gt;Scott
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26567679&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26567679&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sglist%289%29-tp23622374p26567679.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26555848</id>
	<title>[[atch] Re: anyone interested in helping fixing the 'tcc' compiler ?</title>
	<published>2009-11-28T10:50:04Z</published>
	<updated>2009-11-28T10:50:04Z</updated>
	<author>
		<name>Luigi Rizzo-5</name>
	</author>
	<content type="html">followup to myself due to scarce success...
&lt;br&gt;I have done some partial step in fixing the ELF produced by tcc
&lt;br&gt;to work with freebsd. A patch is attached which works for simple
&lt;br&gt;programs but not for more complex ones.
&lt;br&gt;&lt;br&gt;I found the following problems:
&lt;br&gt;- tcc does not produce a PHDR program header, which caused the
&lt;br&gt;&amp;nbsp; linker to fail. This should be fixed by this patch.
&lt;br&gt;&lt;br&gt;- the relocation sections produced by tcc apparently include a
&lt;br&gt;&amp;nbsp; mix of JMP and non JMP relocations in the same place.
&lt;br&gt;&amp;nbsp; Our loader complains when it finds this mix.
&lt;br&gt;&amp;nbsp; I have changed the section definitions but it seems to work
&lt;br&gt;&amp;nbsp; only for simple things (Hello World -style).
&lt;br&gt;&lt;br&gt;- the relocation info is not in the place rtld is looking for.
&lt;br&gt;&amp;nbsp; What i found is that UNDEF symbols had the offset to be
&lt;br&gt;&amp;nbsp; patched in the dynsym section, instead of the .got section where
&lt;br&gt;&amp;nbsp; (apparently) our loader is looking for. The function
&lt;br&gt;&amp;nbsp; patch_dynsym_undef() in the patch attached seems to handle this,
&lt;br&gt;&amp;nbsp; but I am not sure how general is this.
&lt;br&gt;&lt;br&gt;With this patch the simplest example programs (ex1, ex2, ex3, ex5)
&lt;br&gt;do work, but ex4 (which uses -lX11) fails to load
&lt;br&gt;ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/i386/reloc.c:292
&lt;br&gt;(I hope i can track this later).
&lt;br&gt;&lt;br&gt;cheers
&lt;br&gt;luigi
&lt;br&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;On Sun, Nov 22, 2009 at 12:17:32PM +0100, Luigi Rizzo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; I have recently started playing with the Tiny C Compuler (lang/tcc)
&lt;br&gt;&amp;gt; which is amazingly useful for prototyping, but has problem generating
&lt;br&gt;&amp;gt; non-static binaries in FreeBSD -- basically it produces a bogus
&lt;br&gt;&amp;gt; elf file which our loader does not like.
&lt;br&gt;&amp;gt; Static binaries work fine, as well as 'tcc -run ' (compile
&lt;br&gt;&amp;gt; and run on the fly -- you should really try it if you haven't yet).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There is an open PR on this
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.freebsd.org/cgi/query-pr.cgi?pr=138481&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/cgi/query-pr.cgi?pr=138481&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and the problem is known upstream but no fix
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.gnu.org/archive/html/tinycc-devel/2005-07/msg00070.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.gnu.org/archive/html/tinycc-devel/2005-07/msg00070.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, from the description it does not seem a horribly
&lt;br&gt;&amp;gt; hard problem. Perhaps someone with a bit of knowledge on
&lt;br&gt;&amp;gt; how our ld-elf.so works should not have a hard time pinpointing
&lt;br&gt;&amp;gt; the problem so that other people can fix it ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any takers ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; cheers
&lt;br&gt;&amp;gt; luigi
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26555848&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26555848&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/anyone-interested-in-helping-fixing-the-%27tcc%27-compiler---tp26464478p26555848.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549393</id>
	<title>Re: [gonzo@freebsd.org: [RFC] GPIO framework]</title>
	<published>2009-11-27T16:02:54Z</published>
	<updated>2009-11-27T16:02:54Z</updated>
	<author>
		<name>Oleksandr Tymoshenko-4</name>
	</author>
	<content type="html">Marc Balmer wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Oleksandr Tymoshenko schrieb:
&lt;br&gt;&amp;gt;&amp;gt; Forwarding RFC to embedded@ because there was typo in Cc address in 
&lt;br&gt;&amp;gt;&amp;gt; the &amp;nbsp;original message :(
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ----- Forwarded message from Oleksandr Tymoshenko &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gonzo@...&lt;/a&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; -----
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Date: Thu, 26 Nov 2009 06:57:36 +0200
&lt;br&gt;&amp;gt;&amp;gt; From: Oleksandr Tymoshenko &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gonzo@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;arch@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;embedded@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: [RFC] GPIO framework
&lt;br&gt;&amp;gt;&amp;gt; User-Agent: Mutt/1.5.20 (2009-06-14)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Recently I've been working on GPIO framework that, I believe, is much 
&lt;br&gt;&amp;gt;&amp;gt; needed for embedded applications of FreeBSD. Now framework
&lt;br&gt;&amp;gt;&amp;gt; is &amp;nbsp;mature enough to show it to the world, so this is my request for 
&lt;br&gt;&amp;gt;&amp;gt; review.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Patch: &lt;a href=&quot;http://people.freebsd.org/~gonzo/mips/gpio.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://people.freebsd.org/~gonzo/mips/gpio.diff&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; sys/gpio.h is based on the same file from NetBSD but all the other 
&lt;br&gt;&amp;gt;&amp;gt; files have been written from the scratch.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; why that?
&lt;/div&gt;Because the hard stuff is hwpart &amp;lt;-&amp;gt; bus &amp;lt;-&amp;gt; devices hierarchy and
&lt;br&gt;their interoperability. For these I wanted to use kobj/newbus API and
&lt;br&gt;it's not available in NetBSD. The rest of the code is relatively
&lt;br&gt;simple.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; Description:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; GPIO stands for General Purpose Input/Output. This interface may be
&lt;br&gt;&amp;gt;&amp;gt; thought of as a set of pins which could serve as input or output 
&lt;br&gt;&amp;gt;&amp;gt; having logical 0 and logical 1 as their values (some other options
&lt;br&gt;&amp;gt;&amp;gt; are applicable, but they're not crucial for this explanation).
&lt;br&gt;&amp;gt;&amp;gt; Most common usage of GPIO interface is LED and button control for
&lt;br&gt;&amp;gt;&amp;gt; various SoCs.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; we do much more, since years: &amp;nbsp;we attach I2C buses over GPIO, or 1-Wire
&lt;br&gt;&amp;gt; buses. &amp;nbsp;GPIO is not just for LEDs.
&lt;/div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I know, these two were picked as an example.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Reference implementation of child device is sys/dev/gpio/gpioled.c
&lt;br&gt;&amp;gt;&amp;gt; It provides on/off function for led(4) API
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any comments/feedback are welcome
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; it suffers from the same problems my implementation in other BSD 
&lt;br&gt;&amp;gt; suffers: &amp;nbsp;No interrupt capabilities, no capability to build buses wider 
&lt;br&gt;&amp;gt; than 1 bit.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Adding interrupts should not be an issue. Child devices setup 
&lt;br&gt;handlers on gpiobus using bus_setup_intr. HW implementation
&lt;br&gt;catches interrupts and reports pins to gpiobus via GPIOBUS_INTR() 
&lt;br&gt;method and then bus dispatches interrupts to child devices. There
&lt;br&gt;might be some hidden pitfalls but I can't tell them from the top of my
&lt;br&gt;head. Some additional info on interrupts/userland interaction here:
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/pipermail/freebsd-arch/2009-November/009711.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/pipermail/freebsd-arch/2009-November/009711.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Could you elaborate on multi-bit buses? I'm not well acquainted
&lt;br&gt;with this area so any examples would help :)
&lt;br&gt;&lt;br&gt;&amp;gt; your gpioctl command line syntax is not nice.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Why? Since there is no need for complex rule language as in, for
&lt;br&gt;instance, ipfw I decided to use traditional getopt approach.
&lt;br&gt;&lt;br&gt;&amp;gt; I suggest you take a closer look at gpio in NetBSD and that we work 
&lt;br&gt;&amp;gt; together on this. &amp;nbsp;My offer stands.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I appreciate your offer but as it was mentioned above the most
&lt;br&gt;vital part is not OS-independent and it makes adopting NetBSD gpio
&lt;br&gt;framework somewhat complicated.
&lt;br&gt;&lt;br&gt;Having ioctl-wise compatibility may turn out useful though. I'll think 
&lt;br&gt;about it.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549393&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A--gonzo%40freebsd.org%3A--RFC--GPIO-framework--tp26549393p26549393.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549185</id>
	<title>[PATCH] Statclock aliasing by LAPIC</title>
	<published>2009-11-27T15:42:50Z</published>
	<updated>2009-11-27T15:42:50Z</updated>
	<author>
		<name>Attilio Rao-2</name>
	</author>
	<content type="html">Handling all the three clocks (hardclock, softclock, profclock) within
&lt;br&gt;the LAPIC can lead to aliasing for the softclock and profclock because
&lt;br&gt;hz is sized to fit mainly hardclock. The fashion to handle all of them
&lt;br&gt;within the LAPIC was introduced in 2005 and before than the softclock
&lt;br&gt;and profclock were supposed to be handled in the rtc. Right now, too,
&lt;br&gt;there is the necessary support to handle profclock and statclock in
&lt;br&gt;atrtc which gets enabled if the LAPIC signals it can't take in charge
&lt;br&gt;the three clocks.
&lt;br&gt;The proposed patch reverts the situation preferring the atrtc to
&lt;br&gt;handle the statclock and profclock (then a different source from the
&lt;br&gt;LAPIC) and then avoid the aliasing problem:
&lt;br&gt;&lt;a href=&quot;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.freebsd.org/~attilio/Sandvine/STABLE_8/statclock_aliasing/statclock_aliasing3.diff&lt;/a&gt;&lt;br&gt;&lt;br&gt;In this patch, lapic_setup_clock() has been changed in order to return
&lt;br&gt;a three-states variable which identified if the LAPIC got in charge
&lt;br&gt;all the three clocks, just the hardclock or none of them (the current
&lt;br&gt;situation is just none/all) and the rtc handling runs subsequently.
&lt;br&gt;A tunable as been added to force LAPI to get in charge all the three
&lt;br&gt;clocks if needed.
&lt;br&gt;In ia32 atrtc compiling is linked to atpic compiling, so a compile
&lt;br&gt;time flag has been added to check if atpic is not present and in case
&lt;br&gt;force LAPIC to take in charge all the three clocks (which is still
&lt;br&gt;better than the 'safe belt values' still present in the rtc code).
&lt;br&gt;&lt;br&gt;Please note that statclock and profclock are widely used in our kernel
&lt;br&gt;(rusage is, for example, statclock driven) and fixing this would
&lt;br&gt;result in specific improvements (as a several-reported wrong CPU usage
&lt;br&gt;statistic in top).
&lt;br&gt;This bug has been found by Sandvine Incorporated.
&lt;br&gt;&lt;br&gt;Reviews, comments and testing are welcome.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Attilio
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peace can only be achieved by understanding - A. Einstein
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549185&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549185&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Statclock-aliasing-by-LAPIC-tp26549185p26549185.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26532644</id>
	<title>Re: [RFC] GPIO framework</title>
	<published>2009-11-26T08:52:21Z</published>
	<updated>2009-11-26T08:52:21Z</updated>
	<author>
		<name>Oleksandr Tymoshenko-2</name>
	</author>
	<content type="html">&amp;gt; 
&lt;br&gt;&amp;gt; Are there any functions to setup interrupts on GPIO pins?
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Not at the moment, but I plan to add interrupt support later.
&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26532644&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.freebsd.org/mailman/listinfo/freebsd-arch&lt;/a&gt;&lt;br&gt;To unsubscribe, send any mail to &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26532644&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;freebsd-arch-unsubscribe@...&lt;/a&gt;&amp;quot;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-RFC--GPIO-framework-tp26524506p26532644.html" />
</entry>

</feed>
