Bug 156637
Summary: | no more MTRRs available after startx | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mark Orenstein <morenstein> | ||||
Component: | xorg-x11 | Assignee: | X/OpenGL Maintenance List <xgl-maint> | ||||
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-05-02 20:44:02 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Mark Orenstein
2005-05-02 19:48:16 UTC
Created attachment 113942 [details]
/etc/X11/xorg.conf
MTRRs are a finite limited resource provided by the CPU (for CPUs that support MTRRs). The BIOS may use some of these to set cacheability of memory regious during POST, and the OS can modify/add/remove regions after that. However, the OS is limited to using what the hardware provides. Additionally, MTRRs have CPU specific rules for how they must be set up. In general, they must be a size range that is a power of 2, and be on a boundary that is a multiple of the size range. The exact rules are CPU brand and model specific. On systems with lots of free MTRRs, often a single MTRR can be used to cover the video framebuffer. Some systems however the video framebuffer does not show up in the memory map at an optimal location, and in order to obey the hardware rules, the X server has to divide the framebuffer region into multiple ranges, each of which obey the rules for setting MTRRs. In some cases, this requires using many MTRRs, and depending on how many were used by the system to begin with, it may result in the inability to set MTRRs for the entire framebuffer. This is not a software bug or limitation however. It is a hardware limitation of the system in question. If the video hardware is not on-board, you can try switching it to a different slot if possible (PCI or PCI-E), which sometimes causes the framebuffer to get assigned a different memory address which might have more favourable MTRR math, and require fewer entries. This is not the case for onboard video such as Intel integrated however as you can not change the slot. MTRRs were a CPU hack added onto Intel CPUs a long time ago, and there are some rather serious limitations in the hardware that can not be worked around in software. This is becoming more and more of a problem on newer systems, in particular with video hardware that has non-contiguous memory, as multiple MTRRs *must* be used on them. Unfortunately, there is no solution for this hardware problem at this time, because Xorg, XFree86, and the Linux kernel are limited to using MTRR, as that is the only mechanism provided for setting cacheability of memory regions. Since Pentium Pro and later, and Athlon and later however, the CPUs provide an alternate and superior mechanism in hardware to allow software to set the cacheability of memory on a page-granular basis. This is the Intel "PAT" (Page Attribute Table) feature. Processors that show "pat" in flags in /proc/cpuinfo have this capability in hardware. Unfortunately, Linux does not implement PAT feature support at this point in time, and so the X server is unable to use it, and is limited then to using the MTRR feature, with it's inherent limitations. Once someone finishes off Linux PAT support, and gets it integrated into Linus's kernel, it will be easy to add support to Xorg to use PAT instead of MTRR, and this problem will more or less vanish. Until that time however, the X server is limited to the features the hardware provides, and that means that it is unable to set up write-combining on some hardware out there due to MTRR limitations. You might try decreasing or increasing the amount of system memory allocated to video memory in your BIOS, as this may alter the way memory gets assigned, and how many MTRRs might be needed. Other than that, there is no other workaround until PAT support is included in the Linux kernel. Setting status to NOTABUG (hardware limitation). |