Re: use video ram as system ram ?

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Wed Apr 05 2000 - 14:20:51 EST


On Wed, 5 Apr 2000, Brian Hall wrote:

> Hmm, true. Might be more useful as a swap "file", similar to the kernel patch
> that allows using uncached high memory (>64MB or >16MB on some motherboards) as
> swap (slram?) Set this "video swap" to a higher swap priority than the HDD
> swap. It might need a way to resize dynamically, i.e. shrink when a user fires
> up Q3A, and expand when more video memory becomes available. There would be a
> swapping delay penalty as data is more from video swap to disk swap, but even
> 32MB should only take a few seconds to swap out. Might really be useful for
> older machines (486s) that have a PCI bus and slow HDDs- just add a nice PCI
> 32MB video card for better swap performance. Since low-end PCs like that have
> memory amounts in the same range as current PCI video cards, this could be a
> good thing, even though it sounds like some kind of throwback to the DOS days at
> first glance!
>

The video RAM reported on video boards as "2Mb, 4Mb,... NMb.", is
not RAM that can be directly accessed via ISA or PCI et all, buses.
It's SRAM mappable to the Video device chip, and assessible only
through a port from the "outside". It isn't even the "Screen regen buffer"
you see at 0xB8000 which is typically only 16 kb. To access that RAM, you
have to enable "graphics mode" and then it's available as 64k pages
from 0xA0000 by writing to page registers through a port. This is only
64k per page and the kernel has no way of "knowing" when to change the
page. The X11 drivers, designed for a particular video card "know" all
about that card and so they can use spare graphics RAM as font buffers.
This is supposed to improve performance. I don't know how because to use
this, it has to be copied from one page into a buffer before it's used.
I would presume it would be faster to leave it in a buffer without
mucking with the screen-card RAM at all.

Cheers,
Dick Johnson

Penguin : Linux version 2.3.41 on an i686 machine (800.63 BogoMips).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:15 EST