From: Ross Tyler <retyler@raytheon.com>
To: linux-kernel@vger.kernel.org
Subject: how does one disable processor cache on memory allocated with get_free_pages?
Date: Wed, 25 Feb 2004 15:37:12 -0800 [thread overview]
Message-ID: <403D31A8.4080204@raytheon.com> (raw)
I am writing a kernel module that is allocating memory using get_free_pages.
It is important that access to/from these pages not use the processor
(Pentium 4) cache.
How can I do this?
I have looked at drivers/char/mem.c which uses a pgprot_noncached
function to modify the vm_page_prot attribute of a vma during a mmap call.
If I understand this correctly, this would make sure that all access to
the pages that are done through the mapping will not be cached.
This will not work for me, however, because I need to access this memory
from the device driver independent of any user code that might mmap it.
I thought of the device driver open'ing and mmap'ing itself but it
doesn't have a special file in the file system (I am not using DEVFS)
and this seems kludgy.
I am hoping that there is a way to simply modify the page table entries
for the allocated pages.
Is there?
If so, what is the mechanism for modifying the entries and synchronizing
the configuration with the processor cache?
Please CC any response directly to me (retyler@raytheon.com).
Thanks!
next reply other threads:[~2004-02-25 23:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 23:37 Ross Tyler [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-26 16:25 how does one disable processor cache on memory allocated with get_free_pages? Ross Tyler
2004-02-27 10:51 ` Benjamin Herrenschmidt
2004-02-27 15:36 ` Ross Tyler
2004-02-27 22:40 ` Benjamin Herrenschmidt
2004-02-27 23:29 ` 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=403D31A8.4080204@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