Re: Mmap device performance
Fri, 12 Dec 1997 04:23:24 +0100

On Thu, Dec 11, 1997 at 06:27:10PM +0000, Linus Torvalds wrote:

> One thing to look out for is the "memory type registers" on the PPro and
> the PII. Somebody had a kernel loadable module to read and set the
> registers, it may be that your windows setup has a different memory type
> setup than the Linux setup.
> Similarly, when you do the mapping, look into the effects of the "cache
> disable" and "write-through" bits in the page tables. You mention that
> you copied the code from the /dev/mem map code, and that code does:
> #if defined(__i386__)
> /*
> * hmm.. This disables high-memory caching, as the XFree86 team
> * wondered about that at one time.
> * The surround logic should disable caching for the high device
> * addresses anyway, but right now this seems still needed.
> */
> if (x86 > 3 && offset >= __pa(high_memory))
> pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
> #endif
> the code _shouldn't_ make any difference (as per the comment), but
> depending on how the card works it might.

I'll have to add a syscall cachectl() make the caching of a memory area
controlable for MIPS. Will that one also be useful for Intel (or other