Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf86MapVidMem error

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: H. Peter Anvin <hpa@...>
Cc: Venki Pallipadi <venkatesh.pallipadi@...>, Rufus & Azrael <rufus-azrael@...>, Ingo Molnar <mingo@...>, Siddha, Suresh B <suresh.b.siddha@...>, Linux-kernel Mailing List <linux-kernel@...>, Yinghai Lu <yhlu.kernel@...>, Thomas Gleixner <tglx@...>
Date: Thursday, May 8, 2008 - 8:34 pm

On Thu, May 08, 2008 at 04:54:44PM -0700, H. Peter Anvin wrote:

What I meant was:
MTRRs are not really base and size. They are defined as base and mask.
Any addr is affected by mtrr if addr & mask == base & mask.
So, MTRR entry like
base = 0xf00000, mask = 0xff00000 with 36 bit physical address covers
0xf00000-0xffffff, 0x10f00000-0x10ffffff, 0x20f00000-0x20ffffff, ....

In this case if user is trying to mmap 0x1a000000-0x2a000000, we cannot really
cover this case with single parsing of variable address ranges. We will have
to go through the sub-ranges withing single variable range, which can be page
by page in worst case.
 

Agree that is has to be called a heuristic. Yes. Not having that will work
may be not as optimially. Having it gives us better starting point when we
start to find a proper memory type for requests, especially when there are
no other overlapping mappings in PAT list.

One of the reason for heristic was to get proper type for /dev/mem maps for WB
region (ACPI and BIOS area). /dev/mem checks to see the mtrr type of the start
address and starts with that type for the request. As long as there are no
other conflict in PAT list, we can give WB to this /dev/mem request. Not
having this heuristic we will have to most probably default to UC.

When there are overlapping PAT list entries, the mtrr_lookup does not matter
as we have to inherit things from those PAT entries or conflicting with them.

This discussion points to - code is not sufficiently commented and/or needs
some refactoring. Will look at this afresh tomorrow morning and see whether
I can some up with some better alternative.

Thanks,
Venki
Thanks,
Venki
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [2.6.25-git18 => 2.6.26-rc1-git1] Xorg crash with xf8..., Venki Pallipadi, (Thu May 8, 8:34 pm)
RE: [2.6.25-git18 =&gt; 2.6.26-rc1-git1] Xorg crash with xf8..., Pallipadi, Venkatesh, (Fri May 9, 9:46 am)