2009-01-06 18:47:29

by Oleksij Rempel

[permalink] [raw]
Subject: [regression] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3"

BIOS EBDA/lowmem at: 0009fc00/0009fc00
Initializing cgroup subsys cpuset
Linux version 2.6.28-rc8-slub-00093-g2520bd3 (lex@zwerg) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #18 SMP Tue Jan 6 18:29:14 CET 2009
Command line: root=/dev/mapper/zwerg-root ro
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000007f790000 (usable)
BIOS-e820: 000000007f790000 - 000000007f79e000 (ACPI data)
BIOS-e820: 000000007f79e000 - 000000007f7e0000 (ACPI NVS)
BIOS-e820: 000000007f7e0000 - 000000007f800000 (reserved)
BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)
DMI 2.4 present.
AMI BIOS detected: BIOS may corrupt low RAM, working it around.
last_pfn = 0x7f790 max_arch_pfn = 0x3ffffffff
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
Scanning 0 areas for low memory corruption
modified physical RAM map:
modified: 0000000000000000 - 0000000000010000 (reserved)
modified: 0000000000010000 - 000000000009fc00 (usable)
modified: 000000000009fc00 - 00000000000a0000 (reserved)
modified: 00000000000e4000 - 0000000000100000 (reserved)
modified: 0000000000100000 - 000000007f790000 (usable)
modified: 000000007f790000 - 000000007f79e000 (ACPI data)
modified: 000000007f79e000 - 000000007f7e0000 (ACPI NVS)
modified: 000000007f7e0000 - 000000007f800000 (reserved)
modified: 00000000ffb80000 - 0000000100000000 (reserved)
init_memory_mapping: 0000000000000000-000000007f790000
0000000000 - 007f600000 page 2M
007f600000 - 007f790000 page 4k
kernel direct mapping tables up to 7f790000 @ 10000-14000
last_map_addr: 7f790000 end: 7f790000
RAMDISK: 376e0000 - 37fef98d
ACPI: RSDP 000FA5D0, 0014 (r0 ACPIAM)
ACPI: RSDT 7F790000, 0040 (r1 NEC 6000701 MSFT 97)
ACPI: FACP 7F790200, 0081 (r1 A_M_I_ OEMFACP 6000701 MSFT 97)
ACPI: DSDT 7F790590, 4BD8 (r1 A0281 A0281081 81 INTL 20060113)
ACPI: FACS 7F79E000, 0040
ACPI: APIC 7F790390, 0080 (r1 A_M_I_ OEMAPIC 6000701 MSFT 97)
ACPI: SLIC 7F790410, 0176 (r1 NEC 6000701 MSFT 97)
ACPI: OEMB 7F79E040, 006B (r1 A_M_I_ AMI_OEM 6000701 MSFT 97)
ACPI: HPET 7F795170, 0038 (r1 A_M_I_ OEMHPET 6000701 MSFT 97)
ACPI: MCFG 7F7951B0, 003C (r1 A_M_I_ OEMMCFG 6000701 MSFT 97)
ACPI: ASF! 7F7951EC, 0099 (r32 LEGEND I865PASF 1 INTL 20060113)
ACPI: Local APIC address 0xfee00000
(6 early reservations) ==> bootmem [0000000000 - 007f790000]
#0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
#1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
#2 [0000200000 - 00007a7794] TEXT DATA BSS ==> [0000200000 - 00007a7794]
#3 [00376e0000 - 0037fef98d] RAMDISK ==> [00376e0000 - 0037fef98d]
#4 [000009fc00 - 0000100000] BIOS reserved ==> [000009fc00 - 0000100000]
#5 [0000010000 - 0000012000] PGTABLE ==> [0000010000 - 0000012000]
found SMP MP-table at [ffff8800000ff780] 000ff780
[ffffe20000000000-ffffe20001bfffff] PMD -> [ffff880001200000-ffff880002dfffff] on node 0
Zone PFN ranges:
DMA 0x00000010 -> 0x00001000
DMA32 0x00001000 -> 0x00100000
Normal 0x00100000 -> 0x00100000
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0x00000010 -> 0x0000009f
0: 0x00000100 -> 0x0007f790
On node 0 totalpages: 522015
DMA zone: 56 pages used for memmap
DMA zone: 1550 pages reserved
DMA zone: 2377 pages, LIFO batch:0
DMA32 zone: 7083 pages used for memmap
DMA32 zone: 510949 pages, LIFO batch:31
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83] disabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 0, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
SMP: Allowing 2 CPUs, 0 hotplug CPUs
PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000e4000
PM: Registered nosave memory: 00000000000e4000 - 0000000000100000
Allocating PCI resources starting at 80000000 (gap: 7f800000:80380000)
PERCPU: Allocating 57344 bytes of per cpu data
NR_CPUS: 2, nr_cpu_ids: 2, nr_node_ids 1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 513326
Kernel command line: root=/dev/mapper/zwerg-root ro
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
Fast TSC calibration using PIT
Detected 3200.719 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Scanning for low memory corruption every 60 seconds
Checking aperture...
No AGP bridge found
Memory: 2040448k/2088512k available (3090k kernel code, 452k absent, 47072k reserved, 1478k data, 376k init)
SLUB: Genslabs=12, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
hpet clockevent registered
HPET: 3 timers in total, 0 timers will be used for per-cpu timer
Calibrating delay loop (skipped), value calculated using timer frequency.. 6401.43 BogoMIPS (lpj=3200719)
Security Framework initialized
SELinux: Disabled at boot.
Mount-cache hash table entries: 256
Initializing cgroup subsys ns
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM1)
ACPI: Core revision 20080926
Setting APIC routing to flat
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: Intel(R) Pentium(R) D CPU 3.20GHz stepping 04
Booting processor 1 APIC 0x1 ip 0x6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 6400.67 BogoMIPS (lpj=3200336)
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 2048K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU1: Thermal monitoring enabled (TM1)
x86 PAT enabled: cpu 1, old 0x7040600070406, new 0x7010600070106
CPU1: Intel(R) Pentium(R) D CPU 3.20GHz stepping 04
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (12802.11 BogoMIPS).
CPU0 attaching sched-domain:
domain 0: span 0-1 level MC
groups: 0 1
CPU1 attaching sched-domain:
domain 0: span 0-1 level MC
groups: 1 0
net_namespace: 1264 bytes
Time: 17:31:03 Date: 01/06/09
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Found Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub with MMCONFIG support.
PCI: Using MMCONFIG at e0000000 - efffffff
PCI: Using configuration type 1 for base access
ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S3 S4 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: No dock devices found.
ACPI: PCI Root Bridge [PCI0] (0000:00)
pci 0000:00:02.0: reg 10 32bit mmio: [0xcfd00000-0xcfd7ffff]
pci 0000:00:02.0: reg 14 io port: [0x7000-0x7007]
pci 0000:00:02.0: reg 18 32bit mmio: [0xd0000000-0xdfffffff]
pci 0000:00:02.0: reg 1c 32bit mmio: [0xcfd80000-0xcfdbffff]
pci 0000:00:1b.0: reg 10 64bit mmio: [0xcfdf8000-0xcfdfbfff]
pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
pci 0000:00:1b.0: PME# disabled
pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
pci 0000:00:1c.0: PME# disabled
pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
pci 0000:00:1c.1: PME# disabled
pci 0000:00:1d.0: reg 20 io port: [0x7400-0x741f]
pci 0000:00:1d.1: reg 20 io port: [0x7800-0x781f]
pci 0000:00:1d.2: reg 20 io port: [0x8000-0x801f]
pci 0000:00:1d.3: reg 20 io port: [0x8400-0x841f]
pci 0000:00:1d.7: reg 10 32bit mmio: [0xcfdffc00-0xcfdfffff]
pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
pci 0000:00:1d.7: PME# disabled
pci 0000:00:1f.0: quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 0480-04bf claimed by ICH6 GPIO
pci 0000:00:1f.1: reg 10 io port: [0xa000-0xa007]
pci 0000:00:1f.1: reg 14 io port: [0x9800-0x9803]
pci 0000:00:1f.1: reg 18 io port: [0x9400-0x9407]
pci 0000:00:1f.1: reg 1c io port: [0x9000-0x9003]
pci 0000:00:1f.1: reg 20 io port: [0x8800-0x880f]
pci 0000:00:1f.2: reg 10 io port: [0xb800-0xb807]
pci 0000:00:1f.2: reg 14 io port: [0xb400-0xb403]
pci 0000:00:1f.2: reg 18 io port: [0xb000-0xb007]
pci 0000:00:1f.2: reg 1c io port: [0xa800-0xa803]
pci 0000:00:1f.2: reg 20 io port: [0xa400-0xa40f]
pci 0000:00:1f.2: PME# supported from D3hot
pci 0000:00:1f.2: PME# disabled
pci 0000:00:1f.3: reg 20 io port: [0x400-0x41f]
pci 0000:00:1c.0: bridge io port: [0xe000-0xefff]
pci 0000:02:00.0: reg 10 32bit mmio: [0xcffe0000-0xcfffffff]
pci 0000:02:00.0: reg 18 io port: [0xd800-0xd81f]
pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
pci 0000:02:00.0: PME# disabled
pci 0000:02:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'
pci 0000:00:1c.1: bridge io port: [0xd000-0xdfff]
pci 0000:00:1c.1: bridge 32bit mmio: [0xcff00000-0xcfffffff]
pci 0000:01:0a.0: reg 10 32bit mmio: [0xcfeff800-0xcfefffff]
pci 0000:01:0a.0: supports D1 D2
pci 0000:00:1e.0: transparent bridge
pci 0000:00:1e.0: bridge io port: [0xc000-0xcfff]
pci 0000:00:1e.0: bridge 32bit mmio: [0xcfe00000-0xcfefffff]
bus 00 -> node 0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P5._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 10 11 12 *14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 12 14 *15)
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 12 14 15) *0, disabled.
ACPI Warning (tbutils-0217): Incorrect checksum in table [OEMB] - 74, should be 73 [20080926]
ACPI: WMI: Mapper loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI-GART: No AMD GART found.
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 comparators, 64-bit 14.318180 MHz counter
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 14 devices
ACPI: ACPI bus type pnp unregistered
system 00:01: iomem range 0xfed13000-0xfed19fff has been reserved
system 00:06: ioport range 0x290-0x297 has been reserved
system 00:07: ioport range 0x4d0-0x4d1 has been reserved
system 00:07: ioport range 0x800-0x87f has been reserved
system 00:07: ioport range 0x400-0x41f has been reserved
system 00:07: ioport range 0x480-0x4bf has been reserved
system 00:07: iomem range 0xfed1c000-0xfed1ffff has been reserved
system 00:07: iomem range 0xfed20000-0xfed8ffff has been reserved
system 00:07: iomem range 0xffb00000-0xffbfffff could not be reserved
system 00:07: iomem range 0xfff00000-0xffffffff has been reserved
system 00:09: iomem range 0xfec00000-0xfec00fff has been reserved
system 00:09: iomem range 0xfee00000-0xfee00fff has been reserved
system 00:0b: iomem range 0xe0000000-0xefffffff has been reserved
system 00:0c: iomem range 0xe0000000-0xefffffff has been reserved
system 00:0d: iomem range 0x0-0x9ffff could not be reserved
system 00:0d: iomem range 0xc0000-0xdffff has been reserved
system 00:0d: iomem range 0xe0000-0xfffff could not be reserved
system 00:0d: iomem range 0x100000-0x7f7fffff could not be reserved
pci 0000:00:1c.0: PCI bridge, secondary bus 0000:03
pci 0000:00:1c.0: IO window: 0xe000-0xefff
pci 0000:00:1c.0: MEM window: disabled
pci 0000:00:1c.0: PREFETCH window: disabled
pci 0000:00:1c.1: PCI bridge, secondary bus 0000:02
pci 0000:00:1c.1: IO window: 0xd000-0xdfff
pci 0000:00:1c.1: MEM window: 0xcff00000-0xcfffffff
pci 0000:00:1c.1: PREFETCH window: disabled
pci 0000:00:1e.0: PCI bridge, secondary bus 0000:01
pci 0000:00:1e.0: IO window: 0xc000-0xcfff
pci 0000:00:1e.0: MEM window: 0xcfe00000-0xcfefffff
pci 0000:00:1e.0: PREFETCH window: disabled
pci 0000:00:1c.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:1c.0: setting latency timer to 64
pci 0000:00:1c.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
pci 0000:00:1c.1: setting latency timer to 64
pci 0000:00:1e.0: setting latency timer to 64
bus: 00 index 0 io port: [0x00-0xffff]
bus: 00 index 1 mmio: [0x000000-0xffffffffffffffff]
bus: 03 index 0 io port: [0xe000-0xefff]
bus: 03 index 1 mmio: [0x0-0x0]
bus: 03 index 2 mmio: [0x0-0x0]
bus: 03 index 3 mmio: [0x0-0x0]
bus: 02 index 0 io port: [0xd000-0xdfff]
bus: 02 index 1 mmio: [0xcff00000-0xcfffffff]
bus: 02 index 2 mmio: [0x0-0x0]
bus: 02 index 3 mmio: [0x0-0x0]
bus: 01 index 0 io port: [0xc000-0xcfff]
bus: 01 index 1 mmio: [0xcfe00000-0xcfefffff]
bus: 01 index 2 mmio: [0x0-0x0]
bus: 01 index 3 io port: [0x00-0xffff]
bus: 01 index 4 mmio: [0x000000-0xffffffffffffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs...<7>Switched to high resolution mode on CPU 1
Switched to high resolution mode on CPU 0
it is
Freeing initrd memory: 9278k freed
audit: initializing netlink socket (disabled)
type=2000 audit(1231263064.096:1): initialized
HugeTLB registered 2 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 4004
alg: No test for stdrng (krng)
alg: No test for stdrng (ansi_cprng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler cfq registered (default)
pci 0000:00:02.0: Boot video device
pcieport-driver 0000:00:1c.0: setting latency timer to 64
pcieport-driver 0000:00:1c.0: found MSI capability
pcieport-driver 0000:00:1c.0: irq 319 for MSI/MSI-X
pci_express 0000:00:1c.0:pcie00: allocate port service
pci_express 0000:00:1c.0:pcie02: allocate port service
pci_express 0000:00:1c.0:pcie03: allocate port service
pcieport-driver 0000:00:1c.1: setting latency timer to 64
pcieport-driver 0000:00:1c.1: found MSI capability
pcieport-driver 0000:00:1c.1: irq 318 for MSI/MSI-X
pci_express 0000:00:1c.1:pcie00: allocate port service
pci_express 0000:00:1c.1:pcie03: allocate port service
input: Power Button (FF) as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1
ACPI: Power Button (CM) [PWRB]
ACPI: SSDT 7F79E0B0, 0208 (r1 AMI CPU1PM 1 INTL 20060113)
processor ACPI_CPU:00: registered as cooling_device0
ACPI: Processor [CPU1] (supports 8 throttling states)
ACPI: SSDT 7F79E2C0, 013A (r1 AMI CPU2PM 1 INTL 20060113)
processor ACPI_CPU:01: registered as cooling_device1
ACPI: Processor [CPU2] (supports 8 throttling states)
Linux agpgart interface v0.103
agpgart-intel 0000:00:00.0: Intel 945G Chipset
agpgart-intel 0000:00:00.0: detected 7932K stolen memory
agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0xd0000000
[drm] Initialized drm 1.1.0 20060810
Serial: 8250/16550 driver4 ports, IRQ sharing disabled
serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
00:0a: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
e1000e: Intel(R) PRO/1000 Network Driver - 0.3.3.3-k6
e1000e: Copyright (c) 1999-2008 Intel Corporation.
e1000e 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
e1000e 0000:02:00.0: setting latency timer to 64
e1000e 0000:02:00.0: irq 317 for MSI/MSI-X
e1000e 0000:02:00.0: Warning: detected DSPD enabled in EEPROM
0000:02:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:13:d4:63:0f:9e
0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection
0000:02:00.0: eth0: MAC: 2, PHY: 2, PBA No: ffffff-0ff
console [netcon0] enabled
netconsole: network logging started
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
ata_piix 0000:00:1f.1: version 2.12
ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 18
ata_piix 0000:00:1f.1: setting latency timer to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0xa000 ctl 0x9800 bmdma 0x8800 irq 18
ata2: PATA max UDMA/100 cmd 0x9400 ctl 0x9000 bmdma 0x8808 irq 18
ata1.00: ATAPI: HP DVD Writer 840b, FF66, max UDMA/33
ata1.00: configured for UDMA/33
isa bounce pool size: 16 pages
scsi 0:0:0:0: CD-ROM HP DVD Writer 840b FF66 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 0:0:0:0: Attached scsi CD-ROM sr0
sr 0:0:0:0: Attached scsi generic sg0 type 5
ata_piix 0000:00:1f.2: PCI INT B -> GSI 17 (level, low) -> IRQ 17
ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
ata_piix 0000:00:1f.2: setting latency timer to 64
scsi2 : ata_piix
scsi3 : ata_piix
ata3: SATA max UDMA/133 cmd 0xb800 ctl 0xb400 bmdma 0xa400 irq 17
ata4: SATA max UDMA/133 cmd 0xb000 ctl 0xa800 bmdma 0xa408 irq 17
ata3.00: ATA-6: ST380817AS, 3.42, max UDMA/133
ata3.00: 156301488 sectors, multi 16: LBA48 NCQ (not used)
ata3.00: configured for UDMA/133
scsi 2:0:0:0: Direct-Access ATA ST380817AS 3.42 PQ: 0 ANSI: 5
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors: (80.0 GB/74.5 GiB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors: (80.0 GB/74.5 GiB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 < sda5 sda6 >
sd 2:0:0:0: [sda] Attached SCSI disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 20 (level, low) -> IRQ 20
ehci_hcd 0000:00:1d.7: setting latency timer to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
ehci_hcd 0000:00:1d.7: cache line size of 128 is not supported
ehci_hcd 0000:00:1d.7: irq 20, io mem 0xcfdffc00
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.28-rc8-slub-00093-g2520bd3 ehci_hcd
usb usb1: SerialNumber: 0000:00:1d.7
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
uhci_hcd 0000:00:1d.0: setting latency timer to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: irq 20, io base 0x00007400
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.28-rc8-slub-00093-g2520bd3 uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.0
uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
uhci_hcd 0000:00:1d.1: setting latency timer to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.1: irq 17, io base 0x00007800
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.28-rc8-slub-00093-g2520bd3 uhci_hcd
usb usb3: SerialNumber: 0000:00:1d.1
uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
uhci_hcd 0000:00:1d.2: setting latency timer to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.2: irq 18, io base 0x00008000
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.28-rc8-slub-00093-g2520bd3 uhci_hcd
usb usb4: SerialNumber: 0000:00:1d.2
uhci_hcd 0000:00:1d.3: PCI INT D -> GSI 19 (level, low) -> IRQ 19
uhci_hcd 0000:00:1d.3: setting latency timer to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1d.3: irq 19, io base 0x00008400
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb usb5: New USB device found, idVendor=1d6b, idProduct=0001
usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: UHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.28-rc8-slub-00093-g2520bd3 uhci_hcd
usb usb5: SerialNumber: 0000:00:1d.3
usbcore: registered new interface driver libusual
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
rtc_cmos 00:03: RTC can wake from S4
rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one month, 114 bytes nvram, hpet irqs
i2c /dev entries driver
i801_smbus 0000:00:1f.3: PCI INT B -> GSI 17 (level, low) -> IRQ 17
w83627ehf: Found W83627EHG chip at 0x290
w83627ehf w83627ehf.656: VID pins in output mode, CPU VID not available
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: [email protected]
cpuidle: using governor ladder
cpuidle: using governor menu
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ALSA device list:
No soundcards found.
TCP cubic registered
PM: Resume from partition /dev/sda7
PM: Checking hibernation image.
PM: Error -6 checking image file
PM: Resume from disk failed.
registered taskstats version 1
Magic number: 9:698:541
rtc_cmos 00:03: setting system clock to 2009-01-06 17:31:05 UTC (1231263065)
Freeing unused kernel memory: 376k freed
Write protecting the kernel read-only data: 4216k
usb 2-1: new low speed USB device using uhci_hcd and address 2
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: New USB device found, idVendor=046a, idProduct=0023
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 3-2: new low speed USB device using uhci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
usb 3-2: New USB device found, idVendor=046d, idProduct=c00e
usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 3-2: Product: USB-PS/2 Optical Mouse
usb 3-2: Manufacturer: Logitech
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
udevd version 124 started
HDA Intel 0000:00:1b.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
HDA Intel 0000:00:1b.0: setting latency timer to 64
hda_codec: Unknown model for ALC883, trying auto-probe from BIOS...
usbcore: registered new interface driver hiddev
input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/input/input2
generic-usb 0003:046D:C00E.0003: input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:1d.1-2/input0
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
input: HID 046a:0023 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/input/input3
cherry 0003:046A:0023.0001: input: USB HID v1.11 Keyboard [HID 046a:0023] on usb-0000:00:1d.0-1/input0
input: HID 046a:0023 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.1/input/input4
cherry 0003:046A:0023.0002: input: USB HID v1.11 Device [HID 046a:0023] on usb-0000:00:1d.0-1/input1
fuse init (API version 7.10)
Adding 979924k swap on /dev/sda5. Priority:-1 extents:1 across:979924k
EXT3 FS on dm-0, internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on dm-1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
ip_tables: (C) 2000-2006 Netfilter Core Team
warning: `avahi-daemon' uses 32-bit capabilities (legacy support in use)
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
Bridge firewalling registered
vnet0: starting userspace STP failed, starting kernel STP
pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
[drm] Initialized i915 1.6.0 20080730 on minor 0
Xorg:5181 map pfn expected mapping type write-back for d1000000-d1c80000, got uncached-minus
Xorg:5181 freeing invalid memtype d1000000-d1c80000
e1000e 0000:02:00.0: irq 317 for MSI/MSI-X
e1000e 0000:02:00.0: irq 317 for MSI/MSI-X
ADDRCONF(NETDEV_UP): eth0: link is not ready
NET: Registered protocol family 17
0000:02:00.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
0000:02:00.0: eth0: 10/100 speed: disabling TSO
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
ecryptfs_parse_options: eCryptfs: unrecognized option 'rw'
ecryptfs_parse_options: eCryptfs: unrecognized option 'user=lex'
0000:02:00.0: eth0: changing MTU from 1500 to 1492
0000:02:00.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
0000:02:00.0: eth0: 10/100 speed: disabling TSO
eth0: no IPv6 routers present
glxgears:5775 map pfn expected mapping type write-back for d1000000-d1c80000, got uncached-minus
glxgears:5775 freeing invalid memtype d1000000-d1c80000


Attachments:
dmesg_good (26.33 kB)
xorg_good (32.18 kB)
xorg_bad (32.13 kB)
dmesg_bad (26.62 kB)
Download all attachments

2009-01-06 18:51:54

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [regression] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3"

Alexey Fisher wrote:
> glx perfomance regression after this patch.
> goot kernel: glxgears = 1400 fps
> bad kernel: glxgears = 300 fps ( same speed with disabled drm module )
>
> kernel log:
> glxgears:5775 map pfn expected mapping type write-back for
> d1000000-d1c80000, got uncached-minus
> glxgears:5775 freeing invalid memtype d1000000-d1c80000
>

Have we caught a case of actual overlap, i.e. a driver bug here?

-hpa

2009-01-06 19:05:05

by Pallipadi, Venkatesh

[permalink] [raw]
Subject: RE: [regression] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3"



>-----Original Message-----
>From: H. Peter Anvin [mailto:[email protected]]
>Sent: Tuesday, January 06, 2009 10:52 AM
>To: Alexey Fisher
>Cc: [email protected];
>[email protected]; Siddha, Suresh B; Pallipadi, Venkatesh
>Subject: Re: [regression] glx performance drop with: "x86:
>PAT: implement track/untrack of pfnmap regions for x86 - v3"
>
>Alexey Fisher wrote:
>> glx perfomance regression after this patch.
>> goot kernel: glxgears = 1400 fps
>> bad kernel: glxgears = 300 fps ( same speed with disabled
>drm module )
>>
>> kernel log:
>> glxgears:5775 map pfn expected mapping type write-back for
>> d1000000-d1c80000, got uncached-minus
>> glxgears:5775 freeing invalid memtype d1000000-d1c80000
>>
>
>Have we caught a case of actual overlap, i.e. a driver bug here?
>

This error is similar to one reported by Kevin here.
http://lkml.indiana.edu/hypermail/linux/kernel/0901.0/00970.html
[ 111.775378] X:5010 map pfn expected mapping type write-back for d0000000-d0101000, got write-combining
[ 111.775456] X:5010 freeing invalid memtype d0000000-d0101000


The sequence seems to be somewhat like this

- Kernel driver sets the whole graphics region to uc-minus or write-combining
- There is a remap_pfn_range() to map a portion of this region to user with "write-back" mapping.

Now there may be a MTRR for this region or there may be none. It will depend on specific system and
whether there were available MTRRs or MTRR setting was possible at all.If there are no MTRR settings,
then we have caught a valid aliasing here.

I have reproduced this problem on a local system here and looking for a sane solution....

Thanks,
Venki-

2009-01-07 01:33:48

by Pallipadi, Venkatesh

[permalink] [raw]
Subject: Re: [regression] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3"

On Tue, Jan 06, 2009 at 11:05:51AM -0800, Pallipadi, Venkatesh wrote:
>
>
>
> >-----Original Message-----
> >From: H. Peter Anvin [mailto:[email protected]]
> >Sent: Tuesday, January 06, 2009 10:52 AM
> >To: Alexey Fisher
> >Cc: [email protected];
> >[email protected]; Siddha, Suresh B; Pallipadi, Venkatesh
> >Subject: Re: [regression] glx performance drop with: "x86:
> >PAT: implement track/untrack of pfnmap regions for x86 - v3"
> >
> >Alexey Fisher wrote:
> >> glx perfomance regression after this patch.
> >> goot kernel: glxgears = 1400 fps
> >> bad kernel: glxgears = 300 fps ( same speed with disabled
> >drm module )
> >>
> >> kernel log:
> >> glxgears:5775 map pfn expected mapping type write-back for
> >> d1000000-d1c80000, got uncached-minus
> >> glxgears:5775 freeing invalid memtype d1000000-d1c80000
> >>
> >
> >Have we caught a case of actual overlap, i.e. a driver bug here?
> >
>
> This error is similar to one reported by Kevin here.
> http://lkml.indiana.edu/hypermail/linux/kernel/0901.0/00970.html
> [ 111.775378] X:5010 map pfn expected mapping type write-back for d0000000-d0101000, got write-combining
> [ 111.775456] X:5010 freeing invalid memtype d0000000-d0101000
>
>
> The sequence seems to be somewhat like this
>
> - Kernel driver sets the whole graphics region to uc-minus or write-combining
> - There is a remap_pfn_range() to map a portion of this region to user with "write-back" mapping.
>
> Now there may be a MTRR for this region or there may be none. It will depend on specific system and
> whether there were available MTRRs or MTRR setting was possible at all.If there are no MTRR settings,
> then we have caught a valid aliasing here.
>
> I have reproduced this problem on a local system here and looking for a sane solution....
>

Looks like there is more than one problem with glxgears with latest git.

Below test patch fixes the memory type conflicts with remap_pfn_range. But,
with this test patch applied to latest git, glxgears does not work on my
test system. It goes into a repeaed ioctl(4, 0x40046445, ..) loop.

But, with
vanilla 2.6.28 + earlier pfnmap tracking patchset v3
I do see lower performance of glxgears compared to vanilla 2.6.28.

and with
vanilla 2.6.28 + earlier pfnmap tracking patchset v3 + test patch below
brings the glxgears performance back to vanilla 2.6.28 level.


Dave: Do you know of any other drm changes post 2.6.28 that may be resulting
in glxgears getting stuck with above ioctl?

Thanks,
Venki


Below is the test patch that fixes the problems related to remap_pfn_range
memory type conflicts. The patch needs some cleanup and comments before it can
go into base. Good enough as a test patch.


Signed-off-by: Venkatesh Pallipadi <[email protected]>

---
arch/x86/mm/pat.c | 59 +++++++++++++++++++++++++++++-------------
include/asm-generic/pgtable.h | 4 +-
mm/memory.c | 12 ++++++--
3 files changed, 52 insertions(+), 23 deletions(-)

Index: linux-2.6/mm/memory.c
===================================================================
--- linux-2.6.orig/mm/memory.c 2009-01-06 17:07:29.000000000 -0800
+++ linux-2.6/mm/memory.c 2009-01-06 17:11:08.000000000 -0800
@@ -1458,7 +1458,7 @@ int vm_insert_pfn(struct vm_area_struct

if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
- if (track_pfn_vma_new(vma, vma->vm_page_prot, pfn, PAGE_SIZE))
+ if (track_pfn_vma_new(vma, &vma->vm_page_prot, pfn, PAGE_SIZE))
return -EINVAL;

ret = insert_pfn(vma, addr, pfn, vma->vm_page_prot);
@@ -1604,9 +1604,15 @@ int remap_pfn_range(struct vm_area_struc

vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;

- err = track_pfn_vma_new(vma, prot, pfn, PAGE_ALIGN(size));
- if (err)
+ err = track_pfn_vma_new(vma, &prot, pfn, PAGE_ALIGN(size));
+ if (err) {
+ /*
+ * To indicate that track_pfn related cleanup is not
+ * needed from higher level routine calling unmap_vmas
+ */
+ vma->vm_flags &= ~(VM_IO | VM_RESERVED | VM_PFNMAP);
return -EINVAL;
+ }

BUG_ON(addr >= end);
pfn -= addr >> PAGE_SHIFT;
Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c 2009-01-06 17:10:49.000000000 -0800
+++ linux-2.6/arch/x86/mm/pat.c 2009-01-06 17:11:08.000000000 -0800
@@ -601,12 +601,13 @@ void unmap_devmem(unsigned long pfn, uns
* Reserved non RAM regions only and after successful reserve_memtype,
* this func also keeps identity mapping (if any) in sync with this new prot.
*/
-static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t vma_prot)
+static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
+ int strict_prot)
{
int is_ram = 0;
int id_sz, ret;
unsigned long flags;
- unsigned long want_flags = (pgprot_val(vma_prot) & _PAGE_CACHE_MASK);
+ unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK);

is_ram = pagerange_is_ram(paddr, paddr + size);

@@ -625,16 +626,35 @@ static int reserve_pfn_range(u64 paddr,
return ret;

if (flags != want_flags) {
- free_memtype(paddr, paddr + size);
- printk(KERN_ERR
- "%s:%d map pfn expected mapping type %s for %Lx-%Lx, got %s\n",
- current->comm, current->pid,
- cattr_name(want_flags),
- (unsigned long long)paddr,
- (unsigned long long)(paddr + size),
- cattr_name(flags));
- return -EINVAL;
- }
+ if (strict_prot) {
+ free_memtype(paddr, paddr + size);
+ printk(KERN_ERR "%s:%d map pfn expected mapping type "
+ "%s for %Lx-%Lx, got %s\n",
+ current->comm, current->pid,
+ cattr_name(want_flags),
+ (unsigned long long)paddr,
+ (unsigned long long)(paddr + size),
+ cattr_name(flags));
+ return -EINVAL;
+ } else if ((want_flags == _PAGE_CACHE_UC_MINUS &&
+ flags == _PAGE_CACHE_WB) ||
+ (want_flags == _PAGE_CACHE_WC &&
+ flags == _PAGE_CACHE_WB)) {
+ free_memtype(paddr, paddr + size);
+ printk(KERN_ERR "%s:%d map pfn expected mapping type "
+ "%s for %Lx-%Lx, got %s\n",
+ current->comm, current->pid,
+ cattr_name(want_flags),
+ (unsigned long long)paddr,
+ (unsigned long long)(paddr + size),
+ cattr_name(flags));
+ return -EINVAL;
+ }
+ *vma_prot = __pgprot((pgprot_val(*vma_prot) &
+ (~_PAGE_CACHE_MASK)) |
+ flags);
+ return 0;
+ }

/* Need to keep identity mapping in sync */
if (paddr >= __pa(high_memory))
@@ -689,6 +709,7 @@ int track_pfn_vma_copy(struct vm_area_st
unsigned long vma_start = vma->vm_start;
unsigned long vma_end = vma->vm_end;
unsigned long vma_size = vma_end - vma_start;
+ pgprot_t pgprot;

if (!pat_enabled)
return 0;
@@ -702,7 +723,8 @@ int track_pfn_vma_copy(struct vm_area_st
WARN_ON_ONCE(1);
return -EINVAL;
}
- return reserve_pfn_range(paddr, vma_size, __pgprot(prot));
+ pgprot = __pgprot(prot);
+ return reserve_pfn_range(paddr, vma_size, &pgprot, 1);
}

/* reserve entire vma page by page, using pfn and prot from pte */
@@ -710,7 +732,8 @@ int track_pfn_vma_copy(struct vm_area_st
if (follow_phys(vma, vma_start + i, 0, &prot, &paddr))
continue;

- retval = reserve_pfn_range(paddr, PAGE_SIZE, __pgprot(prot));
+ pgprot = __pgprot(prot);
+ retval = reserve_pfn_range(paddr, PAGE_SIZE, &pgprot, 1);
if (retval)
goto cleanup_ret;
}
@@ -732,7 +755,7 @@ cleanup_ret:
* track_pfn_vma_new is called when a _new_ pfn mapping is being established
* for physical range indicated by pfn and size.
*
- * prot is passed in as a parameter for the new mapping. If the vma has a
+ * prot is passed in as pointer parameter for the new mapping. If the vma has a
* linear pfn mapping for the entire range reserve the entire vma range with
* single reserve_pfn_range call.
* Otherwise, we look t the pfn and size and reserve only the specified range
@@ -741,7 +764,7 @@ cleanup_ret:
* Note that this function can be called with caller trying to map only a
* subrange/page inside the vma.
*/
-int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
unsigned long pfn, unsigned long size)
{
int retval = 0;
@@ -758,14 +781,14 @@ int track_pfn_vma_new(struct vm_area_str
if (is_linear_pfn_mapping(vma)) {
/* reserve the whole chunk starting from vm_pgoff */
paddr = (resource_size_t)vma->vm_pgoff << PAGE_SHIFT;
- return reserve_pfn_range(paddr, vma_size, prot);
+ return reserve_pfn_range(paddr, vma_size, prot, 0);
}

/* reserve page by page using pfn and size */
base_paddr = (resource_size_t)pfn << PAGE_SHIFT;
for (i = 0; i < size; i += PAGE_SIZE) {
paddr = base_paddr + i;
- retval = reserve_pfn_range(paddr, PAGE_SIZE, prot);
+ retval = reserve_pfn_range(paddr, PAGE_SIZE, prot, 0);
if (retval)
goto cleanup_ret;
}
Index: linux-2.6/include/asm-generic/pgtable.h
===================================================================
--- linux-2.6.orig/include/asm-generic/pgtable.h 2009-01-06 17:10:49.000000000 -0800
+++ linux-2.6/include/asm-generic/pgtable.h 2009-01-06 17:11:08.000000000 -0800
@@ -301,7 +301,7 @@ static inline void ptep_modify_prot_comm
* track_pfn_vma_new is called when a _new_ pfn mapping is being established
* for physical range indicated by pfn and size.
*/
-static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
unsigned long pfn, unsigned long size)
{
return 0;
@@ -332,7 +332,7 @@ static inline void untrack_pfn_vma(struc
{
}
#else
-extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
+extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
unsigned long pfn, unsigned long size);
extern int track_pfn_vma_copy(struct vm_area_struct *vma);
extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,

2009-01-07 22:44:20

by Pallipadi, Venkatesh

[permalink] [raw]
Subject: Re: [regression] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3"

On Tue, Jan 06, 2009 at 05:33:36PM -0800, Pallipadi, Venkatesh wrote:
> On Tue, Jan 06, 2009 at 11:05:51AM -0800, Pallipadi, Venkatesh wrote:
> >
> >
> >
> > >-----Original Message-----
> > >From: H. Peter Anvin [mailto:[email protected]]
> > >Sent: Tuesday, January 06, 2009 10:52 AM
> > >To: Alexey Fisher
> > >Cc: [email protected];
> > >[email protected]; Siddha, Suresh B; Pallipadi, Venkatesh
> > >Subject: Re: [regression] glx performance drop with: "x86:
> > >PAT: implement track/untrack of pfnmap regions for x86 - v3"
> > >
> > >Alexey Fisher wrote:
> > >> glx perfomance regression after this patch.
> > >> goot kernel: glxgears = 1400 fps
> > >> bad kernel: glxgears = 300 fps ( same speed with disabled
> > >drm module )
> > >>
> > >> kernel log:
> > >> glxgears:5775 map pfn expected mapping type write-back for
> > >> d1000000-d1c80000, got uncached-minus
> > >> glxgears:5775 freeing invalid memtype d1000000-d1c80000
> > >>
> > >
> > >Have we caught a case of actual overlap, i.e. a driver bug here?
> > >
> >
> > This error is similar to one reported by Kevin here.
> > http://lkml.indiana.edu/hypermail/linux/kernel/0901.0/00970.html
> > [ 111.775378] X:5010 map pfn expected mapping type write-back for d0000000-d0101000, got write-combining
> > [ 111.775456] X:5010 freeing invalid memtype d0000000-d0101000
> >
> >
> > The sequence seems to be somewhat like this
> >
> > - Kernel driver sets the whole graphics region to uc-minus or write-combining
> > - There is a remap_pfn_range() to map a portion of this region to user with "write-back" mapping.
> >
> > Now there may be a MTRR for this region or there may be none. It will depend on specific system and
> > whether there were available MTRRs or MTRR setting was possible at all.If there are no MTRR settings,
> > then we have caught a valid aliasing here.
> >
> > I have reproduced this problem on a local system here and looking for a sane solution....
> >
>
> Looks like there is more than one problem with glxgears with latest git.
>
> Below test patch fixes the memory type conflicts with remap_pfn_range. But,
> with this test patch applied to latest git, glxgears does not work on my
> test system. It goes into a repeaed ioctl(4, 0x40046445, ..) loop.
>
> But, with
> vanilla 2.6.28 + earlier pfnmap tracking patchset v3
> I do see lower performance of glxgears compared to vanilla 2.6.28.
>
> and with
> vanilla 2.6.28 + earlier pfnmap tracking patchset v3 + test patch below
> brings the glxgears performance back to vanilla 2.6.28 level.
>
>
> Dave: Do you know of any other drm changes post 2.6.28 that may be resulting
> in glxgears getting stuck with above ioctl?

Dave,

I did a git bisect to root cause the second problem of glxgears hanging
and it points me to

--
7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a is first bad commit
commit 7c1c2871a6a3a114853ec6836e9035ac1c0c7f7a
Author: Dave Airlie <[email protected]>
Date: Fri Nov 28 14:22:24 2008 +1000

drm: move to kref per-master structures.

This is step one towards having multiple masters sharing a drm
device in order to get fast-user-switching to work.

It splits out the information associated with the drm master
into a separate kref counted structure, and allocates this when
a master opens the device node. It also allows the current master
to abdicate (say while VT switched), and a new master to take over
the hardware.

It moves the Intel and radeon drivers to using the sarea from
within the new master structures.

Signed-off-by: Dave Airlie <[email protected]>
--

I could not check with this patch removed from latest git as there are some
dependencies. But, checkout of 7c1c2871a6a3 indeed has the problem of glxgears
hanging. My test system is a T61 with FC8 base installation and attached is my
config.

Thanks,
Venki


Attachments:
(No filename) (3.81 kB)
dot.config (43.82 kB)
Download all attachments