linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Fusco <fusco_john@yahoo.com>
To: linux-mm@kvack.org
Subject: Making PCI Memory Cachable
Date: Tue, 28 Nov 2006 08:02:42 -0600	[thread overview]
Message-ID: <456C4182.4020302@yahoo.com> (raw)

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.

Is this crazy or what? I assumed that the VM_IO flag in remap_pfn_range 
controls this, but that doesn't appear to be the case.

A simple test from user space is the following:
    ptr = mmap(...)
    memset(ptr, 'a', size)


The driver gets the pointer with remap_pfn_range, but I always see 
64-bit writes to memory (this is x86_64 architecture). If this were 
cachable and the HW waqs cooperative, I would expect to see cache line 
bursts (e.g. 128 bytes).

I think one of two things is happening:
    a) The kernel is not making this memory cachable
    b) The memory is cachable, but the chipset is throttling the bursts

Can someone enlighten me?

Thanks,
John

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

             reply	other threads:[~2006-11-28 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 14:02 John Fusco [this message]
2006-12-06 22:16 ` Andi Kleen
2006-12-09 14:33 John Fusco
2006-12-09 21:36 ` 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=456C4182.4020302@yahoo.com \
    --to=fusco_john@yahoo.com \
    --cc=linux-mm@kvack.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox