All of lore.kernel.org
 help / color / mirror / Atom feed
* vmalloc cached space..
@ 2003-04-16  9:40 Ashish anand
  2003-04-16 11:57 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Ashish anand @ 2003-04-16  9:40 UTC (permalink / raw)
  To: linux-mips

Hello,

As vmalloc returns KSEG2 cached memory , 
1.can I use a volatile pointer to treat it as safe as uncached..?
or
2. i should use vmalloc_prot (size, PAGE_KERNEL_UNCACHED) in umap.c.

Best regards,
Ashish

 

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

* Re: vmalloc cached space..
  2003-04-16  9:40 vmalloc cached space Ashish anand
@ 2003-04-16 11:57 ` Ralf Baechle
  2003-04-16 13:35   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2003-04-16 11:57 UTC (permalink / raw)
  To: Ashish anand; +Cc: linux-mips

On Wed, Apr 16, 2003 at 03:10:17PM +0530, Ashish anand wrote:

> As vmalloc returns KSEG2 cached memory , 
> 1.can I use a volatile pointer to treat it as safe as uncached..?
> or

Volatile does not mean uncached.  Volatile means the C compiler should not
perform certain optimizations and is usually used for hardware accesses
that have side effects or variables that can be changed from some kind
of interrupt or signal handled and are also read by the main program.

> 2. i should use vmalloc_prot (size, PAGE_KERNEL_UNCACHED) in umap.c.

Uncached memory access is rarely necessary and so _extremly_ slow that it
should be avoided at almost any price.  Maybe you should describe what
you're trying to achieve, then let's see if there's a better suggestion
we can make.

  Ralf

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

* Re: vmalloc cached space..
  2003-04-16 11:57 ` Ralf Baechle
@ 2003-04-16 13:35   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2003-04-16 13:35 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Ashish anand, linux-mips

On Wed, 16 Apr 2003, Ralf Baechle wrote:

> > 2. i should use vmalloc_prot (size, PAGE_KERNEL_UNCACHED) in umap.c.
> 
> Uncached memory access is rarely necessary and so _extremly_ slow that it
> should be avoided at almost any price.  Maybe you should describe what
> you're trying to achieve, then let's see if there's a better suggestion
> we can make.

 In particular using cached accesses for stores and then doing writebacks
(plus invalidates if necessary) is still faster with WB caches. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

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

end of thread, other threads:[~2003-04-16 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-16  9:40 vmalloc cached space Ashish anand
2003-04-16 11:57 ` Ralf Baechle
2003-04-16 13:35   ` 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.