linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel C <nix.or.die@googlemail.com>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Mika Fischer <mika.fischer@zoopnet.de>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Jesse Barnes <jesse.barnes@intel.com>,
	balajirrao@gmail.com, Andi Kleen <andi@firstfloor.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86_32: trim memory by updating e820 v3
Date: Tue, 29 Apr 2008 00:56:43 +0200	[thread overview]
Message-ID: <4816562B.2070905@googlemail.com> (raw)
In-Reply-To: <86802c440804281503q1f9e6f8anb18cd514e89b76fe@mail.gmail.com>

Yinghai Lu wrote:
> On Mon, Apr 28, 2008 at 2:19 PM, Gabriel C <nix.or.die@googlemail.com> wrote:
>> Gabriel C wrote:
>>  > Gabriel C wrote:
>>  >> Yinghai Lu wrote:
>>  >>> On Mon, Apr 28, 2008 at 7:24 AM, Gabriel C <nix.or.die@googlemail.com> wrote:
>>  >>>> Mika Fischer wrote:
>>  >>>>  > Hi Ingo,
>>  >>>>  >
>>  >>>>  > I'm having the same problem.
>>  >>>>  >
>>  >>>>  > Ingo Molnar schrieb:
>>  >>>>  >> excellent. So just to make sure: this box never had proper graphics
>>  >>>>  >> under Linux (under no previous kernel), due to the way the BIOS has set
>>  >>>>  >> up the MTRR's, right?
>>  >>>>  >
>>  >>>>  > Well, not quite. X still works fine, but since the video memory is
>>  >>>>  > overlapped by two of the existing MTRRs, X cannot add a write-combining
>>  >>>>  > range for the video memory. That makes X rather slow especially if you
>>  >>>>  > use DRI for Compiz etc.
>>  >>>>
>>  >>>>  Well you are lucky then :)
>>  >>>>
>>  >>>>  Yeah X 'worked' but it worked as slow as with vesa video driver here.
>>  >>> [    0.000000] rangeX: 0000000000000000 - 00000000d0000000
>>  >>> [    0.000000] Setting variable MTRR 0, base: 0MB, range: 2048MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 1, base: 2048MB, range: 1024MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 2, base: 3072MB, range: 256MB, type WB
>>  >>> [    0.000000] range0: 00000000cf800000 - 00000000cf800000
>>  >>> [    0.000000] range: 00000000cf800000 - 00000000d0000000
>>  >>> [    0.000000] Setting variable MTRR 3, base: 3320MB, range: 8MB, type WB
>>  >>> [    0.000000] range0: 0000000100000000 - 0000000120000000
>>  >>> [    0.000000] Setting variable MTRR 4, base: 4096MB, range: 512MB, type WB
>>  >>> [    0.000000] range: 0000000120000000 - 0000000130000000
>>  >>> [    0.000000] Setting variable MTRR 5, base: 4608MB, range: 256MB, type WB
>>  >>> [    0.000000] hole: 000000012c000000 - 0000000130000000
>>  >>> [    0.000000] Setting variable MTRR 6, base: 4800MB, range: 64MB, type UC
>>  >>>
>>  >>> so your X server need two entries for WB?
>>  >>>
>>  >>> can you send out /proc/mtrr with booting with disable_mtrr_cleanup?
>>  >> I can just not right now , cannot reboot the box yet. In about 1h or so , maybe less.
>>  >
>>  > Here the output with v3 which is disabled by default:
>>  >
>>  > --($:~)-- cat /proc/mtrr
>>  > reg00: base=0xd0000000 (3328MB), size= 256MB: uncachable, count=1
>>  > reg01: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
>>  > reg02: base=0x00000000 (   0MB), size=4096MB: write-back, count=1
>>  > reg03: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
>>  > reg04: base=0x120000000 (4608MB), size= 128MB: write-back, count=1
>>  > reg05: base=0x128000000 (4736MB), size=  64MB: write-back, count=1
>>  > reg06: base=0xcf600000 (3318MB), size=   2MB: uncachable, count=1
>>  >
>>  > dmesg is saying now :
>>  >
>>  > [   22.764595] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
>>  >
>>  >
>>  > My card settings in BIOS ( that was default ) are the following :
>>  >
>>  > DVMT Mode -> DVMT Mode ( possible setting DVMT Mode or Fixed Mode )
>>  > DVMT / Memory -> 256MB ( possible settings 128/256 MB or Maximum DVMT )
>>  >
>>  > Initiate Graphics Adapter -> PEG/PCI ( possible settings IGD , PCI/IGD , PCI/PEG , PEG/IGD )
>>  > Internal Graphics Mode Select -> Enabled,8MB ( possible settings Enabled,8MB , Enabled,1MB maybe Disabled I forgot to look)
>>  > PEG Port -> Auto ( possible settings Auto , Disabled )
>>  > PEG Port Force x1 -> Disabled ( possible settings Enabled , Disabled )
>>  >
>>  > Of course these settings are only possible when the card is not disabled :)
>>  >
>>  > I'm gonna try v4 now and enable it. Please let me know if you need more infos.
>>
>>  Hmm v4 doesn't work anymore here ( I've tested with all possible settings in BIOS ).
>>  It takes 6 minutes to boot to :
>>
> 
> so you card is using 256M and 8M? 0xd0000000-0xe0000000, where is
> another 8M address.

Looks like this , yes. Is using the 256MB Memory and the 8MB for Graphics Mode Select.

I'm not really sure why the 8MB are needed , BIOS book doesn't tell me.
I could try to disable and see what I get =)

> 
> mtrr by BIOS is very interesting:
> before
>>  > reg02: base=0x00000000 (   0MB), size=4096MB: write-back, count=1
>>  > reg06: base=0xcf600000 (3318MB), size=   2MB: uncachable, count=1
>>  > reg00: base=0xd0000000 (3328MB), size= 256MB: uncachable, count=1
>>  > reg01: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
>>  > reg03: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
>>  > reg04: base=0x120000000 (4608MB), size= 128MB: write-back, count=1
>>  > reg05: base=0x128000000 (4736MB), size=  64MB: write-back, count=1
> 
> 
> after 256M chunk size got
>>  >>> [    0.000000] Setting variable MTRR 0, base: 0MB, range: 2048MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 1, base: 2048MB, range: 1024MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 2, base: 3072MB, range: 256MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 3, base: 3320MB, range: 8MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 4, base: 4096MB, range: 512MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 5, base: 4608MB, range: 256MB, type WB
>>  >>> [    0.000000] Setting variable MTRR 6, base: 4800MB, range: 64MB, type UC
> 
> so the convering is right..., need to spare another entry for your card.
> 
> or we can dumping the
>>  >>> [    0.000000] Setting variable MTRR 3, base: 3320MB, range: 8MB, type WB
> for extra entra...
> 
> but the mtrr trimming code need to be updated instead of only using highest_pfn
> 
> YH
> 

Gabriel


  reply	other threads:[~2008-04-28 23:10 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20  4:45 [PATCH] x86: disable_mtrr_trim only need for x86_64 Yinghai Lu
2008-01-20  5:37 ` H. Peter Anvin
2008-01-20  6:55   ` Yinghai Lu
2008-01-20  8:17   ` [PATCH] x86_64: update e820 instead of updating end_pfn Yinghai Lu
2008-01-20  9:20     ` Ingo Molnar
2008-01-20 15:08       ` Andi Kleen
2008-01-21  5:40         ` [PATCH] x86_64: update e820 instead of updating end_pfn v2 Yinghai Lu
2008-01-21  5:44           ` [PATCH] x86_32: trim memory by updating e820 Yinghai Lu
2008-01-21  5:58           ` [PATCH] x86_64: update e820 instead of updating end_pfn v2 Andi Kleen
2008-01-21  6:05             ` Harvey Harrison
2008-01-21  6:08               ` Andi Kleen
2008-01-21  6:14                 ` Li Zefan
2008-01-21  6:57             ` [PATCH] x86_64: check if Tom2 is enabled Yinghai Lu
2008-01-21 17:24               ` Cyrill Gorcunov
2008-01-21 17:39                 ` H. Peter Anvin
2008-01-21 17:49                   ` Cyrill Gorcunov
2008-01-21 18:03                 ` Andi Kleen
2008-01-21 18:09                   ` Cyrill Gorcunov
2008-01-21 18:15                     ` H. Peter Anvin
2008-01-21 18:46                       ` Andi Kleen
2008-01-21  0:00       ` [PATCH] x86_64: update e820 instead of updating end_pfn Yinghai Lu
     [not found] ` <200801202255.02645.yinghai.lu@sun.com>
     [not found]   ` <200801202255.58642.yinghai.lu@sun.com>
2008-01-21  6:56     ` [PATCH] x86_32: trim memory by updating e820 v2 Yinghai Lu
2008-01-21 16:30       ` Jesse Barnes
2008-01-21 19:14         ` Justin Piszcz
2008-01-21 20:09           ` Yinghai Lu
2008-01-21 21:37             ` Justin Piszcz
2008-01-23  3:50               ` Yinghai Lu
2008-01-26  0:01                 ` Justin Piszcz
2008-01-26  0:16                   ` Yinghai Lu
2008-01-26  0:37                     ` Justin Piszcz
2008-01-28 15:09                   ` Ingo Molnar
2008-01-28 18:07                     ` Justin Piszcz
2008-01-22 16:51       ` Ingo Molnar
2008-01-23  0:23         ` [PATCH] x86_32: trim memory by updating e820 v3 Yinghai Lu
2008-04-26 10:56           ` Andrew Morton
2008-04-26 12:56             ` Gabriel C
2008-04-27  1:05               ` Yinghai Lu
2008-04-28 18:07                 ` Eric W. Biederman
2008-04-28 23:16                   ` Yinghai Lu
2008-04-29 10:31                   ` Ingo Molnar
2008-04-29 17:29                     ` Eric W. Biederman
2008-04-29 18:40                       ` Yinghai Lu
2008-04-29 19:19                         ` Eric W. Biederman
2008-04-29 19:44                           ` Yinghai Lu
2008-04-29 20:02                             ` Eric W. Biederman
2008-04-28  6:44               ` Yinghai Lu
2008-04-28  9:18                 ` Gabriel C
2008-04-28  9:34                   ` Yinghai Lu
2008-04-28  9:54                     ` Gabriel C
2008-04-28 10:03                       ` Gabriel C
2008-04-28 10:07                         ` Mika Fischer
2008-04-28 19:03                           ` Yinghai Lu
2008-04-28 13:53                       ` Ingo Molnar
2008-04-28 14:11                         ` Mika Fischer
2008-04-28 14:24                           ` Gabriel C
2008-04-28 19:06                             ` Yinghai Lu
2008-04-28 19:38                               ` Gabriel C
2008-04-28 20:45                                 ` Gabriel C
2008-04-28 21:19                                   ` Gabriel C
2008-04-28 22:03                                     ` Yinghai Lu
2008-04-28 22:56                                       ` Gabriel C [this message]
2008-04-28 23:23                                         ` Yinghai Lu
2008-04-29  1:05                                           ` Gabriel C
2008-04-29  2:41                                             ` Yinghai Lu
2008-04-29 10:34                                               ` Ingo Molnar
2008-04-29 10:42                                                 ` Yinghai Lu
2008-04-28 19:08                             ` Yinghai Lu
2008-04-28 19:46                               ` Gabriel C
2008-04-28 14:15                         ` Gabriel C
2008-04-28 16:09                         ` Jesse Barnes
2008-04-28 16:31                           ` Mika Fischer
2008-04-28 16:55                             ` Jesse Barnes
2008-04-29 10:37                           ` Ingo Molnar
2008-04-29 12:40                             ` Andrew Morton
2008-04-29 15:52                             ` Jesse Barnes
2008-04-29 22:03                               ` [patch] PCI: export resource_wc in pci sysfs Ingo Molnar
2008-04-29 22:24                                 ` Andrew Morton
2008-04-27  0:57             ` [PATCH] x86_32: trim memory by updating e820 v3 Yinghai Lu
2008-04-27  8:21               ` Mika Fischer
2008-04-27  1:22             ` Yinghai Lu
2008-04-27  8:29               ` Mika Fischer
2008-04-28  6:50             ` Yinghai Lu
2008-04-28  8:38               ` Mika Fischer
2008-04-28  9:09                 ` Yinghai Lu
2008-04-28  9:44                   ` Mika Fischer
2008-04-28  9:58                     ` Gabriel C
2008-01-21  6:57   ` [PATCH] x86_64: update e820 instead of updating end_pfn v3 Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4816562B.2070905@googlemail.com \
    --to=nix.or.die@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=balajirrao@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jesse.barnes@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.fischer@zoopnet.de \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).