public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Tyler <retyler@raytheon.com>
To: linux-kernel@vger.kernel.org
Subject: Re: how does one disable processor cache on memory allocated with get_free_pages?
Date: Thu, 26 Feb 2004 08:25:21 -0800	[thread overview]
Message-ID: <403E1DF1.9060901@raytheon.com> (raw)

Andrew,

Thank you for taking the time to reply. I really appreciate your help.

My understanding of ioremap_nocache is that it falls short of what I 
need to do.
It is appropriate for, say, mapping physical memory on a PCI device that 
is marked prefetchable (and otherwise subject to caching when mapped 
with ioremap) as non-caching.
Can you confirm my understanding?

If so, it will not work for me as I am not mapping physical memory but 
memory allocated by get_free_pages.
Do you concur?

AFAIK, the only way to access this memory without using processor cache 
is to have a device driver memory map it for a process like 
drivers/char/mem.c does.
When the memory is accessed through these memory mapped pages, the 
access will not be cached.
When the memory is accessed through the get_free_pages pages, the access 
will be cached.
Concur?

In order to access this process mapped memory from outside the context 
of the process it was mapped for, one either needs to independently 
remap it for the current process (what to do in interrupt code?) or set 
up a kiobuf to the memory.
It has been my experience, however, that the pages referenced by the 
kiobuf are the same pages returned by get_free_pages.
I expect these same pages have the same (caching) attributes associated 
with them which would not work.
?

Again, I thank you for your support.

Andrew Morton wrote:

>Ross Tyler <retyler@raytheon.com> wrote:
>  
>
>>If so, what is the mechanism for modifying the entries and synchronizing 
>>the configuration with the processor cache?
>>    
>>
>
>The only thing we have is ioremap_nocache()
>  
>



             reply	other threads:[~2004-02-26 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 16:25 Ross Tyler [this message]
2004-02-27 10:51 ` how does one disable processor cache on memory allocated with get_free_pages? Benjamin Herrenschmidt
2004-02-27 15:36   ` Ross Tyler
2004-02-27 22:40     ` Benjamin Herrenschmidt
2004-02-27 23:29       ` Ross Tyler
  -- strict thread matches above, loose matches on Subject: below --
2004-02-25 23:37 Ross Tyler

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=403E1DF1.9060901@raytheon.com \
    --to=retyler@raytheon.com \
    --cc=linux-kernel@vger.kernel.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