custom driver issue with 2.6.7
From: John Fusco (fusco_john_at_yahoo.com)
Date: 07/22/04
- Next message: Ralf Render: "new kernel 2.6"
- Previous message: Floyd L. Davidson: "Re: keyboards and scancodes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 22 Jul 2004 00:28:56 GMT
I am porting a custom driver from Linux 2.4 to 2.6 (specifically 2.6.7).
The supports mmap much like .../kernel/drivers/char/mem.c. The memory
is reserved at boot time using the "mem=YYY" boot parameter.
The problem I have is that the memory that is mapped into user space is
extremely slow on 2.6. The data rate to do a write() from mmap'd memory
to any device (including /dev/shm) is about 20 MB/s.
The system is a dual Xeon 2.8 GHz with 2GB PC2100 RAM. So 20 MB/s is
extremely slow for this system. I've checked and tweaked every flag I
can find and nothing seems to make any difference.
The pgprot flags indicate that the vm_area struct is cacheable (PWT and
PCD not set). The vma flags are set to VM_RESERVED and VM_IO. I also
tried both MAP_SHARED and MAP_PRIVATE flags in the mmap call. Nothing
seems to make any difference.
My intuition tells me that the memory is behaving as if it were not
cacheable. Everything I look at tells me it it is cacheable - including
the MTRR registers (as reported by /proc/mtrr).
Does anyone know why this would behave so differently on 2.6? Linux 2.4
has no issues with this driver.
Thanks,
John
- Next message: Ralf Render: "new kernel 2.6"
- Previous message: Floyd L. Davidson: "Re: keyboards and scancodes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|