vram

Can vram be used as a cache rather then a frame buffer since its faster the the main memory?
Your terminology is a bit confusing: there was a time where you had special VRAM that was created specifically for video cards. GDDR is obviously also graphics related, but VRAM was special in that it had a separate special serial read-out port that was used to scan out the final image and send it to the D/A convertors of the video connector. This way, the random read/write access port could be used in parallel with the scan-out operation to improve performance.

Now I'm guessing that you're not referring to that particular kind of RAM and that you're simply wondering if the GDDR RAM that is used in the current frame buffer could be used as a cache for a CPU?

In general, I believe the answer is no. GDDR RAM than SDDR is not faster in the way memory banks and rows can be opened and closed, so the access latency stays the similar. Caches are usually used as bandwidth amplifiers, but in the case of CPUs their prime function is for latency hiding. And that's not going to help any.

The main advantages for GDDR RAM compared to SDDR are higher clocks so higher bandwidth. It also has the ability to send bank/row open and close commands every clock (if memory serves.) SDDR has a lower rate of open and close commands. This is a problem for workloads where you have a lot of memory transactions in parallel that aren't very much correlated, as is the case for GPUs.
 
Now I'm guessing that you're not referring to that particular kind of RAM and that you're simply wondering if the GDDR RAM that is used in the current frame buffer could be used as a cache for a CPU?

In general, I believe the answer is no. GDDR RAM than SDDR is not faster in the way memory banks and rows can be opened and closed, so the access latency stays the similar. Caches are usually used as bandwidth amplifiers, but in the case of CPUs their prime function is for latency hiding. And that's not going to help any.
There's also the matter of the PCIe bus that you need to cross in order to access any data "cached" in the GPU's memory not to mention that GPU memory is normally flagged as USWC (uncached, speculatively write combined memory is the old term, but today it's usually used to refer to uncached, write combined memory) from the CPU's point of view so CPU reads would be quite slow. The GPU could be used to DMA data back to system memory, but, again, you're limited by PCIe bus speed.
 
Back in the day some people used half of the humoungous 32MB of VRAM in the geforce 2 for swap under linux. I mean, if you had 16MB main RAM, 16MB ultra fast VRAM was awesomely better than your POS 5400rpm hard disk.
IIRC it created a block device on the memory mapped VRAM after telling the X server it only had 16MB, fun times.
 
Woah, thats awesome is it possible to do anything like that under windows

Unlikely, unless you can tell the (closed source) driver and the (closed source) windowed system to not touch half of the VRAM. But maybe there is a registry tweak.
Then you have to write a driver that presents part of the memory as a block device to windows (it might already exist, or you could hack some open source RAM disk to use the memory mapped VRAM instead of normal RAM).
 
Back
Top