Multi-core vs. Single thread performance

By: Matt Craighead (matt.craighead.delete@this.conifersystems.com),
Room: Moderated Discussions
JasonB (no@spam.com) on 11/13/08 wrote:
---------------------------
>One of the cool things about the 3Dlabs graphics cards was the use of an MMU between the GPU and VRAM.
>
>Rather than the driver having to upload multiple mipmap levels of entire textures
>into VRAM because it didn't know in advance exactly what texels (or even textures)
>would be needed, the MMU could demand-page in the exact texels at the exact mipmap
>levels it needed during rendering, dramatically reducing the amount of VRAM required
>to effectively render a scene compared to an ATI or NVIDIA card. Since 3D graphics
>often has a lot of temporal coherence the VRAM acted as a very effective cache with
>relatively low levels of RAM - VRAM traffic.

MMU-based, interrupt-based demand paging of textures in 3D graphics is *not* a good idea. In fact, it's a really terrible idea for the CPU to have to take an interrupt in the middle of a frame to have to download a bunch of textures. In the meantime, the graphics pipe is stalled!

If the texture data is in locked-down system memory already, your best bet is for the GPU to texture from system memory at reduced performance and to migrate that data into video memory at the next available opportunity.

If the texture data is *not* in locked-down system memory but instead is in regular pageable system memory or on disk, you have much bigger problems. The GPU's kernel driver takes an interrupt and... then what? You can't access pageable system memory in an ISR or even a DPC. You could schedule a worker thread, but when you start looking at interrupt latencies, OS scheduler latencies, kernel virtual address space limitations on 32-bit OS's and the performance costs of mapping and unmapping stuff on demand, security considerations with the kernel reaching directly into an untrusted user-space app, etc. this rapidly starts looking like a worse and worse idea.

Disk would be even worse; consider disk read latencies vs. real-time 3D graphics frame times. If your working set can't fit in RAM or can't be prefetched by the time it's needed, "real-time" is doomed.

This is one of those ideas that sounds great in theory but simply does not work in practice. You will do much better with an intelligent software texture manager in the OGL/D3D driver. 3Dlabs sold you a bill of goods on this one. I would be surprised if 3Dlabs actually implemented half of what their marketing slides claimed in terms of "virtual texturing" support.

--
Matt Craighead
Founder/CEO, Conifer Systems LLC
http://www.conifersystems.com
< Previous Post in ThreadNext Post in Thread >
Thread (115 posts)
TopicPosted ByPosted
Multi-core vs. Single thread performanceIntelUser2000
  Multi-core vs. Single thread performanceLinus Torvalds
    Multi-core vs. Single thread performanceanon
      Multi-core vs. Single thread performanceJasonB
        Multi-core vs. Single thread performanceIntelUser2000
          Multi-core vs. Single thread performanceJasonB
            What does your app do?David Kanter
              What does your app do?JasonB
        Multi-core vs. Single thread performanceRagingDragon
          Multi-core vs. Single thread performanceJasonB
            Multi-core vs. Single thread performanceRagingDragon
              Multi-core vs. Single thread performanceJasonB
      Multi-core vs. Single thread performanceHenrik S
      Multi-core vs. Single thread performancePaul
        Multi-core vs. Single thread performanceslacker
          Multi-core vs. Single thread performanceanonymous
          Multi-core vs. Single thread performancePaul
            Red AnnouncementsPaul
            Multi-core vs. Single thread performanceslacker
    Multi-core vs. Single thread performanceanon
      Bob Colwell ?anon
      Multi-core vs. Single thread performanceRagingDragon
    Multi-core vs. Single thread performanceIntelUser2000
      Multi-core vs. Single thread performanceLinus Torvalds
        Multi-core vs. Single thread performanceDoug Siebert
          Multi-core vs. Single thread performanceLinus Torvalds
            Multi-core vs. Single thread performanceDoug Siebert
            Multi-core vs. Single thread performanceGabriele Svelto
            Multi-core vs. Single thread performanceJasonB
              Multi-core vs. Single thread performancegolfbum
              Multi-core vs. Single thread performanceMatt Craighead
                Multi-core vs. Single thread performanceLinus Torvalds
                  Multi-core vs. Single thread performancea reader
                    Multi-core vs. Single thread performanceJasonB
                      Multi-core vs. Single thread performanceMatt Craighead
                        Multi-core vs. Single thread performanceJasonB
                          Multi-core vs. Single thread performanceIan Ameline
                            Sounds like extreme use casesDavid Kanter
                              Sounds like extreme use casesMatt Craighead
                                SLI/XFire statsMatt Sayler
                              Sounds like extreme use casesanon
                              Sounds like extreme use casesJasonB
                          Multi-core vs. Single thread performanceMatt Craighead
                            Multi-core vs. Single thread performanceJasonB
                              Multi-core vs. Single thread performanceAnonymous
                                AgreedJasonB
                                Multi-core vs. Single thread performanceanon
                  Multi-core vs. Single thread performanceMatt Craighead
                    Multi-core vs. Single thread performanceGabriele Svelto
                      Multi-core vs. Single thread performanceAnonymouse
                        Multi-core vs. Single thread performanceMatt Craighead
                          Multi-core vs. Single thread performancepgerassi
                            GPUs and VMDavid Kanter
                          Multi-core vs. Single thread performanceJasonB
                Multi-core vs. Single thread performanceJasonB
                  Multi-core vs. Single thread performanceMatt Craighead
                    Multi-core vs. Single thread performanceJasonB
                      Multi-core vs. Single thread performanceMatt Craighead
                        Multi-core vs. Single thread performanceJasonB
                          Multi-core vs. Single thread performancepgerassi
                            Multi-core vs. Single thread performanceUngo
        idiots and performanceCarlie Coats
          most are to dumb for performance?Moritz
            most are to dumb for performance?Carlie Coats
    Multi-core vs. Single thread performanceAnonymous
      Multi-core vs. Single thread performanceJasonB
        Multi-core vs. Single thread performanceJS
          Multi-core vs. Single thread performanceIan Ollmann
      Multi-core vs. Single thread performanceJesper Frimann
        Multi-core vs. Single thread performanceChris
          Multi-core vs. Single thread performanceMichael S
            Multi-core vs. Single thread performanceChris
              Multi-core vs. Single thread performanceHoward Chu
    Ahmdahls law works for hardware also.Jouni Osmala
      Ahmdahls law works for hardware also.Gabriele Svelto
        Exactly (NT)Michael S
        And so Svelto's law was born (NT)Rob Thorpe
        Quad core CPUs are nowhere near power limitsDoug Siebert
          Quad core CPUs are nowhere near power limitsanonymous
            Quad core CPUs are nowhere near power limitsDoug Siebert
    Multi-core vs. Single thread performanceMoritz
      Multi-core vs. Single thread performanceJasonB
      What are we going to do with all that silicon? (Paging Groo)James
        What are we going to do with all that silicon? (Paging Groo)Groo
    Multi-core vs. Single thread performanceIan Ollmann
      Multi-core vs. Single thread performanceJasonB
        Multi-core vs. Single thread performanceslacker
          Multi-core vs. Single thread performanceJasonB
        Multi-core vs. Single thread performanceLinus Torvalds
          Multi-core vs. Single thread performanceRagingDragon
            Multi-core vs. Single thread performanceJasonB
              Multi-core vs. Single thread performanceAnonymous
                Multi-core vs. Single thread performanceJasonB
                Anonymous what became of your VLIW-based x86 startup company ?anon
            Multi-core vs. Single thread performanceAnonymous
              Multi-core vs. Single thread performanceRagingDragon
                Floating point - a tool of the devilDavid Kanter
                  Floating point - a tool of the devilFoo_
                    Floating point - a tool of the devilMatt Sayler
                      Floating point - a tool of the devilAnonymous
                      Floating point - a tool of the devilFoo_
                      Floating point - a tool of the devilFoo_
                        Floating point - a tool of the devilHoward Chu
            Multi-core vs. Single thread performanceAaron Spink
  Multi-core vs. Single thread performancehobold
  A third positionslacker
    A third positionJasonB
      A third positionpgerassi
      A third positionRagingDragon
    A third positionJukka Larja
    Power 6Joe
      Power 6slacker
    A third positionWes Felter
    A second position on physicsMoritz
      A second position on physicsRagingDragon