Skip to contentSkip to conversation

Making PCI Memory Cachable

DISCUSSION John Fusco 2 participants 2 messages Dec 9, 2006 Memory management

lore
Share & tools
lore

John Fusco

author
#0 lore raw

----- Original Message ----

From: Andi Kleen <[email protected]>

To: John Fusco <[email protected]>

Sent: Wednesday, December 6, 2006 4:16:27 PM

Subject: Re: Making PCI Memory Cachable

Quoted 10 lines · John Fusco

I have numerous custom PCI devices that implement SRAM or DRAM on the

PCI bus. I would like to explore making this memory cachable in the

hopes that writes to memory can be done from user space and will be done

in bursts rather than single cycles.

You want write combining, not cacheable. The only way to do

this currently is to set a MTRR. See Documentation/mtrr.txt

by default.

Quoted 1 line

b) The memory is cachable, but the chipset is throttling the bursts

The normal cache coherency protocol doesn't work over PCI

-Andi

Thanks for the reply.

I am aware of the MTRRs, but I was hoping for a more elegant solution.

BTW, why won't cache coherency protocol work over PCI? It has commands to support this, such as "memory read line" and "memory write line". Is it that Linux does not allow memory outside of RAM to be cacheable?

John

____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 1 line

BTW, why won't cache coherency protocol work over PCI?

It's not supported by the hardware. There is a initiative from Intel to support it in the future over PCI-Express, but that's some time off and still most devices won't support it.

Quoted 1 line

It has commands to support this, such as "memory read line" and "memory write line". Is it that Linux does not allow memory outside of RAM to be cacheable?

A proper cache coherency protocol is much more complicated. It's a relatively complex state machine (MESI). Details vary by CPUs.

-Andi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>