public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to make mmap'ed kernel buffer non-cacheable
@ 2007-04-20 13:00 Bhuvan Kumar MITTAL
  2007-04-20 13:43 ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Bhuvan Kumar MITTAL @ 2007-04-20 13:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: bhuvan.mittal

Hi,
  I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting dropped in user space and I get only 50-60% of the data which is randomly ordered. The user to kernel level buffer address translation code is fine and I suspect this data dropping is occurring coz the kernel buffer is cacheable. Please suggest me some way of making the entire buffer non cacheable. I am stuck on this for quite a while now. 

Regards,

Bhuvan



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How to make mmap'ed kernel buffer non-cacheable
@ 2007-04-20 13:32 Daniel J Blueman
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel J Blueman @ 2007-04-20 13:32 UTC (permalink / raw)
  To: bhuvan.mittal; +Cc: Linux Kernel

On 20 Apr, 14:20, Bhuvan Kumar MITTAL <bhuvan.mit...@st.com> wrote:
> Hi,
>   I am working on an audio device driver development on Linux. I have a kernel
> buffer which I have mapped to user space using mmap call from user space. My
> problem is that the data which comes to the kernel buffer is getting dropped in
> user space and I get only 50-60% of the data which is randomly ordered. The user
> to kernel level buffer address translation code is fine and I suspect this data
> dropping is occurring coz the kernel buffer is cacheable. Please suggest me some
> way of making the entire buffer non cacheable. I am stuck on this for quite a while
> now.

You can use rdmsr() in your driver to check if the page attribute
table MSR is available, then find and/or add the right entry in the
table to set in each page's flags. This is documented in the Intel
IA-32 Intel Architecture Software Developer's Manuals at intel.com.

Dan
-- 
Daniel J Blueman

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-05-02  8:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-20 13:00 How to make mmap'ed kernel buffer non-cacheable Bhuvan Kumar MITTAL
2007-04-20 13:43 ` Alan Cox
2007-04-23  4:11   ` Bhuvan Kumar MITTAL
2007-04-23  4:25     ` Nick Piggin
2007-05-01  3:58       ` Bhuvan Kumar MITTAL
2007-05-01 12:09         ` Nick Piggin
2007-05-02  8:23           ` Bhuvan Kumar MITTAL
2007-05-02  8:45             ` Nick Piggin
  -- strict thread matches above, loose matches on Subject: below --
2007-04-20 13:32 Daniel J Blueman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox