From: "H. Peter Anvin" <hpa@zytor•com>
To: David Laight <David.Laight@ACULAB•COM>
Cc: Ben Hutchings <bhutchings@solarflare•com>,
Benjamin LaHaise <bcrl@kvack•org>,
Linus Torvalds <torvalds@linux-foundation•org>,
David Miller <davem@davemloft•net>,
tglx@linutronix•de, mingo@redhat•com, netdev@vger•kernel.org,
linux-net-drivers@solarflare•com, x86@kernel•org
Subject: Re: [PATCH 2/3] x86_64: Define 128-bit memory-mapped I/O operations
Date: Wed, 22 Aug 2012 08:49:41 -0700 [thread overview]
Message-ID: <5034FF95.9070108@zytor.com> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6FC1@saturn3.aculab.com>
On 08/22/2012 08:27 AM, David Laight wrote:
>> 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.
>
> FWIW can you even guarantee to do an atomic 64bit PCIe transfer
> on many systems (without resorting to a dma unit).
>
On many systems, perhaps, but I suspect that 32 bits is the maximum you
can truly guarantee.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2012-08-22 15:50 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 1:17 [PATCH 0/3] x86_64, sfc: 128-bit memory-mapped I/O Ben Hutchings
2012-08-22 1:20 ` [PATCH 1/3] x86_64: Define 128-bit types for kernel code only Ben Hutchings
2012-08-22 1:23 ` [PATCH 2/3] x86_64: Define 128-bit memory-mapped I/O operations Ben Hutchings
2012-08-22 1:37 ` H. Peter Anvin
2012-08-22 2:04 ` Ben Hutchings
2012-08-22 2:34 ` David Miller
2012-08-22 3:24 ` H. Peter Anvin
2012-08-22 3:29 ` David Miller
2012-08-22 3:49 ` H. Peter Anvin
2012-08-22 3:52 ` Linus Torvalds
2012-08-22 3:59 ` H. Peter Anvin
2012-08-22 4:14 ` David Miller
2012-08-22 21:14 ` David Miller
2012-08-22 21:28 ` Linus Torvalds
2012-08-22 21:38 ` David Miller
2012-08-22 4:35 ` Linus Torvalds
2012-08-22 5:00 ` David Miller
2012-08-22 14:06 ` Linus Torvalds
2012-08-22 4:42 ` Linus Torvalds
2012-08-22 13:26 ` Ben Hutchings
2012-08-22 14:20 ` Linus Torvalds
2012-08-22 14:24 ` Ben Hutchings
2012-08-22 14:30 ` Benjamin LaHaise
2012-08-22 14:58 ` Ben Hutchings
2012-08-22 15:13 ` H. Peter Anvin
2012-08-22 15:27 ` David Laight
2012-08-22 15:49 ` H. Peter Anvin [this message]
2012-08-22 15:51 ` Ben Hutchings
2012-08-22 15:54 ` H. Peter Anvin
2012-08-22 16:44 ` Ben Hutchings
2012-08-22 16:49 ` H. Peter Anvin
2012-08-22 16:55 ` Linus Torvalds
2012-08-22 17:09 ` Ben Hutchings
2012-08-22 17:12 ` H. Peter Anvin
2012-08-22 17:27 ` Ben Hutchings
2012-08-22 17:54 ` Linus Torvalds
2012-08-22 18:11 ` Ben Hutchings
2012-08-22 18:18 ` H. Peter Anvin
2012-08-22 18:28 ` Linus Torvalds
2012-08-22 19:01 ` Ben Hutchings
2012-08-22 17:26 ` Linus Torvalds
2012-08-22 16:51 ` Linus Torvalds
2012-08-22 16:59 ` H. Peter Anvin
2012-08-22 15:51 ` H. Peter Anvin
2012-08-22 14:50 ` Linus Torvalds
2012-08-22 14:56 ` Linus Torvalds
2012-08-22 15:05 ` David Laight
2012-08-22 15:16 ` Linus Torvalds
2012-08-22 15:41 ` Ben Hutchings
2012-08-22 14:42 ` David Laight
2012-08-22 1:26 ` [PATCH 3/3] sfc: Use __raw_writeo() to perform TX descriptor push where possible Ben Hutchings
2012-08-22 1:38 ` [PATCH 0/3] x86_64, sfc: 128-bit memory-mapped I/O H. Peter Anvin
2012-08-22 1:43 ` Ben Hutchings
2012-08-22 1:59 ` H. Peter Anvin
2012-08-22 2:10 ` Ben Hutchings
2012-08-22 2:31 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5034FF95.9070108@zytor.com \
--to=hpa@zytor$(echo .)com \
--cc=David.Laight@ACULAB$(echo .)COM \
--cc=bcrl@kvack$(echo .)org \
--cc=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-net-drivers@solarflare$(echo .)com \
--cc=mingo@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=tglx@linutronix$(echo .)de \
--cc=torvalds@linux-foundation$(echo .)org \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox