Is the slow access to memory mapped via remap_pfn_range a MTRR / PAT issue?

Solution Verified - Updated -

Issue

  • Slow access to memory mapped via remap_pfn_range
  • Customer is using remap_pfn_range within a kernel module and is reporting that regions of a certain size or larger display slow access times.
  • We suspect the issue might have to do with caching being disabled on certain regions. The customer's experience is consistent with http://www.linuxquestions.org/questions/showthread.php?p=4952240#post4952240.
  • we have a message from our online community concerning access to memory mapped via remap_pfn_range. Here a short description what they do:
    1. at boot time we limit the amount of memory used by Linux (grub parameter mem=...)
    2. we have a small device driver that maps the memory outside the Linux area via remap_pfn_range
  • The above works OK in RHEL5 and in RHEL6. But in RHEL6, on some systems, RAM access is much slower (factor [4..5]).
  • According to my understanding the slowness sets in when the size of the remapped memory is above 3GB / reaches 4GB:
map area size    Read time (usec)    Write time (usec)
1 GB                  1.22e-3                  1.00e-3
2 GB                  1.22e-3                  1.00e-3
3 GB                  1.22e-3                  1.00e-3
4 GB                  4.81e-2                  2.01e-2
  • Is this behaviour to be expected? Can it be influenced by tuning some parameter?

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.