custom driver issue with 2.6.7

From: John Fusco (fusco_john_at_yahoo.com)
Date: 07/22/04


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



Relevant Pages

  • RE: 2.6.17 hangs during boot on ASUS M2NPV-VM motherboard
    ... ASUSTeK Computer Inc. Unknown device 81c0 ... Flags: bus master, 66MHz, fast devsel, latency 0 ... 00:00.1 RAM memory: nVidia Corporation C51 Memory Controller ...
    (Linux-Kernel)
  • Re: 2.6.17 hangs during boot on ASUS M2NPV-VM motherboard
    ... ASUSTeK Computer Inc. Unknown device 81c0 ... Flags: bus master, 66MHz, fast devsel, latency 0 ... 00:00.1 RAM memory: nVidia Corporation C51 Memory Controller ...
    (Linux-Kernel)
  • [PATCH 08/12] i386: Convert the boot time page tables to the kernels native format.
    ... So this patch rewrites the code that initializes our boot time page ... The default yes will allow the kernel to do irq load balancing. ... To make EFI call EFI runtime service in physical addressing mode we need ... * This is how much memory *in addition to the memory covered up to ...
    (Linux-Kernel)
  • Re: [patch 0/5] Support for sanitization flag in low-level page allocator
    ... you really don't need to scan memory for anything. ... large category of buffers that don't get freed/reallocated notably ring ... I might be able to provide the updated patchset for SLAB/vma flags too. ... hypervisor kernel can often be configured to have vastly less external ...
    (Linux-Kernel)
  • Re: Unable to view properties when I right click mouse
    ... Right-click is extremely slow only when Network is enabled ... I think it may be a program running in the background or memory ... I recently ran across response from Ramesh to "jimmyd" back Dec 2005 ... Could be something that's running in the background that Task manager ...
    (microsoft.public.windowsxp.help_and_support)