* mmap'ed memory cacheable or uncheable
@ 2003-07-25 3:26 ` Teresa Tao
0 siblings, 0 replies; 8+ messages in thread
From: Teresa Tao @ 2003-07-25 3:26 UTC (permalink / raw)
To: linux-mips
Hi there,
I got a question regarding the mmap'ed memory. Is the mmap'ed memory cacheable or uncheable? My driver just use the remap_page_range to map a reserved physical memory.
Thanks in advance!
Teresa
^ permalink raw reply [flat|nested] 8+ messages in thread
* mmap'ed memory cacheable or uncheable
@ 2003-07-25 3:26 ` Teresa Tao
0 siblings, 0 replies; 8+ messages in thread
From: Teresa Tao @ 2003-07-25 3:26 UTC (permalink / raw)
To: linux-mips
Hi there,
I got a question regarding the mmap'ed memory. Is the mmap'ed memory cacheable or uncheable? My driver just use the remap_page_range to map a reserved physical memory.
Thanks in advance!
Teresa
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mmap'ed memory cacheable or uncheable
2003-07-25 3:26 ` Teresa Tao
(?)
@ 2003-07-25 22:02 ` Jun Sun
-1 siblings, 0 replies; 8+ messages in thread
From: Jun Sun @ 2003-07-25 22:02 UTC (permalink / raw)
To: Teresa Tao; +Cc: linux-mips, jsun
On Thu, Jul 24, 2003 at 08:26:59PM -0700, Teresa Tao wrote:
> Hi there,
>
> I got a question regarding the mmap'ed memory. Is the mmap'ed memory cacheable or uncheable? My driver just use the remap_page_range to map a reserved physical memory.
>
I am pretty much sure it is cached, although I can't pin down exactly
where in the mm subsystem it does so - I have had cache bugs related
to mmap().
Jun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mmap'ed memory cacheable or uncheable
2003-07-25 3:26 ` Teresa Tao
(?)
(?)
@ 2003-07-31 11:31 ` Ralf Baechle
-1 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2003-07-31 11:31 UTC (permalink / raw)
To: Teresa Tao; +Cc: linux-mips
On Thu, Jul 24, 2003 at 08:26:59PM -0700, Teresa Tao wrote:
> I got a question regarding the mmap'ed memory. Is the mmap'ed memory
> cacheable or uncheable? My driver just use the remap_page_range to map
> a reserved physical memory.
Mmap(2) creates cachable mappings for everything below the highest memory
address and uncached above that. That's a somewhat naive mechanism
which fails a few systems but somehow nobody did complain so far ...
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mmap'ed memory cacheable or uncheable
2003-07-28 21:24 ` Jun Sun
@ 2003-07-29 16:09 ` Maciej W. Rozycki
0 siblings, 0 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2003-07-29 16:09 UTC (permalink / raw)
To: Jun Sun; +Cc: Teresa Tao, linux-mips
On Mon, 28 Jul 2003, Jun Sun wrote:
> > How about if I specify the following flags in my mmap routine just like what the pgprot_noncached micro did.
> > pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
> > pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
> >
> > Will this have kernel make the mmap'd memory non-cacheable? Or is there a mmap non-cacheable patch?
>
> I think this might work. Did you try it? The performance will be bad
> though as mmap() is used widely by userland.
See mmap_mem() for how to select between cached and uncached mmap()ing
cleanly.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mmap'ed memory cacheable or uncheable
2003-07-25 22:52 ` Teresa Tao
(?)
@ 2003-07-28 21:24 ` Jun Sun
2003-07-29 16:09 ` Maciej W. Rozycki
-1 siblings, 1 reply; 8+ messages in thread
From: Jun Sun @ 2003-07-28 21:24 UTC (permalink / raw)
To: Teresa Tao; +Cc: linux-mips, jsun
On Fri, Jul 25, 2003 at 03:52:33PM -0700, Teresa Tao wrote:
> How about if I specify the following flags in my mmap routine just like what the pgprot_noncached micro did.
> pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
> pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
>
> Will this have kernel make the mmap'd memory non-cacheable? Or is there a mmap non-cacheable patch?
>
I think this might work. Did you try it? The performance will be bad
though as mmap() is used widely by userland.
Jun
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: mmap'ed memory cacheable or uncheable
@ 2003-07-25 22:52 ` Teresa Tao
0 siblings, 0 replies; 8+ messages in thread
From: Teresa Tao @ 2003-07-25 22:52 UTC (permalink / raw)
To: Jun Sun, Teresa Tao; +Cc: linux-mips
How about if I specify the following flags in my mmap routine just like what the pgprot_noncached micro did.
pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
Will this have kernel make the mmap'd memory non-cacheable? Or is there a mmap non-cacheable patch?
Thanks in advance!
Teresa
-----Original Message-----
From: Jun Sun [mailto:jsun@mvista.com]
Sent: Friday, July 25, 2003 3:02 PM
To: Teresa Tao
Cc: linux-mips@linux-mips.org; jsun@mvista.com
Subject: Re: mmap'ed memory cacheable or uncheable
On Thu, Jul 24, 2003 at 08:26:59PM -0700, Teresa Tao wrote:
> Hi there,
>
> I got a question regarding the mmap'ed memory. Is the mmap'ed memory cacheable or uncheable? My driver just use the remap_page_range to map a reserved physical memory.
>
I am pretty much sure it is cached, although I can't pin down exactly
where in the mm subsystem it does so - I have had cache bugs related
to mmap().
Jun
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: mmap'ed memory cacheable or uncheable
@ 2003-07-25 22:52 ` Teresa Tao
0 siblings, 0 replies; 8+ messages in thread
From: Teresa Tao @ 2003-07-25 22:52 UTC (permalink / raw)
To: Jun Sun, Teresa Tao; +Cc: linux-mips
How about if I specify the following flags in my mmap routine just like what the pgprot_noncached micro did.
pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK;
pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED;
Will this have kernel make the mmap'd memory non-cacheable? Or is there a mmap non-cacheable patch?
Thanks in advance!
Teresa
-----Original Message-----
From: Jun Sun [mailto:jsun@mvista.com]
Sent: Friday, July 25, 2003 3:02 PM
To: Teresa Tao
Cc: linux-mips@linux-mips.org; jsun@mvista.com
Subject: Re: mmap'ed memory cacheable or uncheable
On Thu, Jul 24, 2003 at 08:26:59PM -0700, Teresa Tao wrote:
> Hi there,
>
> I got a question regarding the mmap'ed memory. Is the mmap'ed memory cacheable or uncheable? My driver just use the remap_page_range to map a reserved physical memory.
>
I am pretty much sure it is cached, although I can't pin down exactly
where in the mm subsystem it does so - I have had cache bugs related
to mmap().
Jun
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-07-31 11:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-25 3:26 mmap'ed memory cacheable or uncheable Teresa Tao
2003-07-25 3:26 ` Teresa Tao
2003-07-25 22:02 ` Jun Sun
2003-07-31 11:31 ` Ralf Baechle
2003-07-25 22:52 Teresa Tao
2003-07-25 22:52 ` Teresa Tao
2003-07-28 21:24 ` Jun Sun
2003-07-29 16:09 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.