Thread (56 messages) flat view 56 messages, 6 authors, 2012-08-22

Re: [PATCH 2/3] x86_64: Define 128-bit memory-mapped I/O operations

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2012-08-22 15:51:59

On 08/22/2012 08:27 AM, David Laight wrote:
quoted
Your architecture sounds similar to one I once worked on (Orion
Microsystems CNIC/OPA-2).  That architecture had a descriptor ring in
device memory, and a single trigger bit would move the head pointer.

We used write combining to write out a set of descriptors, and then
used
a non-write-combining write to do the final write which bumps the head
pointer.  The UC write flushes the write combiners ahead of it, so it
ends up with two transactions (one for the WC data and one for the UC
trigger) but it could frequently push quite a few descriptors in that
operation.
The code actually looks more like a normal ethernet ring interface
with an 'owner' bit in each entry.
So it is important to write the owner bit last.

It might be possibly to set multiple ring entries in two TLPs
by first writing all of them (maybe with write combining)
but without changing the ownership of the first entry.
Then doing a second transfer to update the owner bit it
the first entry.
The order of the writes in the first transfer would then not
matter.
The design flaw in that kind of design would be the need to set the 
owner bit on every entry.  Now, in the case of CNIC/OPA-2 support for 
write combining was an explicit design goal, so writes are inert until 
the trigger bit is written, at which point the head pointer is moved to 
the entry containing the trigger bit.  Very effective.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help