From: ebiederm@xmission.com (Eric W. Biederman)
To: Andi Kleen <ak@suse.de>
Cc: Roland Dreier <rdreier@cisco.com>,
linux-kernel@vger.kernel.org, mst@mellanox.co.il,
jackm@mellanox.co.il
Subject: Re: pgprot_writecombine() and PATs on x86
Date: Wed, 25 Apr 2007 12:31:34 -0600 [thread overview]
Message-ID: <m1abwws3uh.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <200704252019.28017.ak@suse.de> (Andi Kleen's message of "Wed, 25 Apr 2007 20:19:27 +0200")
Andi Kleen <ak@suse.de> writes:
> On Wednesday 25 April 2007 20:02:26 Roland Dreier wrote:
>> Hi Eric,
>>
>> Where do your patches to add an implementation of
>> pgprot_writecombine() using PATs on x86 stand?
>
> It's on my todo list.
Basically enabling PAT is easy. Adding the paranoid checks is
trickier. I keep intending to do something but...
>> The mlx4 driver I'm
>> planning on merging for 2.6.22 would really like writecombining, and
>> I'm interested in doing the work to finally get the PAT stuff merged
>> (probably for 2.6.23 I guess).
>>
>> Just to give a little background on my motivation: the mlx4 hardware
>> allows a page in its PCI space to be mapped, where the driver can write
>> descriptors and payloads directly, instead of ringing a doorbell and
>> having the HW fetch the descriptor from system memory, for better latency.
>
> When it's PCI space you can likely just use MTRRs. PAT is mostly useful
> for applications that do IO with random memory pages
The problem is that on machines with larger memory configurations (8-12G)
there are no spare mtrrs, or the mtrrs can frequently be configured in
an overlapping way so that we can't set them up. In general mtrrs
work ok for one card possible for two and after that they are just
useless.
PAT is also much easier to use from a driver perspective, and it is
much more portable between architectures. Using mtrrs from drivers
is almost impossible.
Roland is the mlx4 sane enough to put the memory that needs
write-combining a prefetchable bar. So several cards can be combined
together?
Eric
next prev parent reply other threads:[~2007-04-25 18:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 18:02 pgprot_writecombine() and PATs on x86 Roland Dreier
2007-04-25 18:19 ` Andi Kleen
2007-04-25 18:31 ` Eric W. Biederman [this message]
2007-04-25 18:35 ` Roland Dreier
2007-04-25 18:45 ` Eric W. Biederman
2007-04-26 5:43 ` Michael S. Tsirkin
2007-04-26 6:13 ` Eric W. Biederman
2007-04-25 18:33 ` Roland Dreier
2007-04-25 18:41 ` Dave Jones
2007-04-25 19:10 ` Andi Kleen
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=m1abwws3uh.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=jackm@mellanox.co.il \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@mellanox.co.il \
--cc=rdreier@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.