tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD 5.1 TCP performance issue (lots of ACK)



On Tue, Nov 22, 2011 at 03:10:52PM -0800, Dennis Ferguson wrote:
> [...]
> You are assuming the above somehow applied to Intel CPUs which existed
> in 2004, but that assumption is incorrect.  There were no Intel (or AMD)
> CPUs which worked like that in 2004, since post-2007 manuals document the
> ordering behavior of all x86 models from the 386 forward, and explicitly
> says that none of them have reordered reads, so the above could only a
> statement of what they expected future CPUs might do and not what
> they actually did.

This is clearly not my experience. I can say for sure that without lfence
instructions, the xen front/back drivers are not working properly
(and I'm not the only one saying this).

> 
> This is clear in the post-2007 revision I have, where the section you quote
> above now says:

It also says that we should not rely on this behavior and, for compatibility
with future processors programmers should use memory barrier instructions
where appropriate.

Anyway, what prompted this discussion is the added bus_dmamap_sync()
in thw wm driver. It's needed because:
- we may be using bounce buffering, and we don't know in which order
  the copy to bounce buffer is done
- all the world is not x86.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index