View Full Version : Can Side-Port Memory be mounted as a high priority swap?
duby229
01-17-2009, 10:03 AM
http://www.biostar.com.tw/app/en-us/t-series/introduction.php?S_ID=375
Hey guys, this is the board that I'm looking into getting. I'm not going to be using the onboard graphics. Instead I have a x1950Pro that will be used instead. I'm trying to justify buying a board with on board graphics that I'm not going to use. So I thought mounting a ridiculously high priority swap partition on the side port memory may just be worthwhile.
Can this be done? First it would have to be readable as a block device. I can see the memory range in /proc/mtrr. But how can I access it as a block device?
tettamanti
01-17-2009, 12:04 PM
Can this be done? First it would have to be readable as a block device. I can see the memory range in /proc/mtrr. But how can I access it as a block device?
You can use MTD_PHRAM to use that memory area as a MTD device; then with MTD_BLOCK you can use that as a block device. Be sure that nothing else (e.g. a video driver) is touching that memory otherwise it will explode in a spectacular way :D (seriously, you risk a massive corruption of your filesystems)
bridgman
01-17-2009, 01:01 PM
Just a caution; sideport memory is pretty narrow, maybe 16 bits wide, so it's not screaming fast. I guess it's faster than seeking around on a hard disk but probably slower than everything else. The primary purpose of sideport these days is to let you shut down the CPU and stop waking it up with HyperTransport requests for frame buffer data.
duby229
01-17-2009, 01:37 PM
Just a caution; sideport memory is pretty narrow, maybe 16 bits wide, so it's not screaming fast. I guess it's faster than seeking around on a hard disk but probably slower than everything else. The primary purpose of sideport these days is to let you shut down the CPU and stop waking it up with HyperTransport requests for frame buffer data.
Do you think it'll be more then say.... ummm.... 200MB/s?
Say its 16bits wide and running at 200mhz so that would be 200mhz x 16bits / 8 = 400MB/s Does that sound about right?
bridgman
01-17-2009, 02:12 PM
That sounds right for the raw data rate, might actually be higher for DDRx since you get multiple transfers per clock. Not sure what you would get after going through all the in-between logic though.
duby229
01-17-2009, 03:29 PM
That sounds right for the raw data rate, might actually be higher for DDRx since you get multiple transfers per clock. Not sure what you would get after going through all the in-between logic though.
Well, I dont have the board yet but when I get it I'll post the results here and let you all know what I think about it. It may not be worth it but I'll give it a try and post my results here.
bridgman
01-17-2009, 03:56 PM
Sounds good.
BTW if anyone is wondering why I said sideport is not fast, it probably has 800MB/s transfer rate or higher (DDR) but even refreshing a single 1680x1050 screen takes at least 400 MB/s (4 bytes read per pixel, 60 times/sec) and scrolling the screen smoothly probably takes twice that.
curaga
01-17-2009, 04:25 PM
Hey, that sounds pretty nice. Like a proper implementation of what was done with the Gamecube ARAM.
duby229
01-17-2009, 04:40 PM
Hey, that sounds pretty nice. Like a proper implementation of what was done with the Gamecube ARAM.
Thats actually where I got the idea. :D
duby229
01-17-2009, 04:43 PM
Sounds good.
BTW if anyone is wondering why I said sideport is not fast, it probably has 800MB/s transfer rate or higher (DDR) but even refreshing a single 1680x1050 screen takes at least 400 MB/s (4 bytes read per pixel, 60 times/sec) and scrolling the screen smoothly probably takes twice that.
800MB/s second would make a pretty dang fast swap space though. It may suck as video memory, but if I can benchmark it at 800MB/s with hdparm then I'd be terribly happy with it as a swap space. I was figuring 400MB/s, but hey 800MB/s would be better.
chithanh
01-17-2009, 10:01 PM
Using video memory as swap is straightforward: http://en.gentoo-wiki.com/wiki/Using_Graphics_Card_Memory_as_Swap
This is somewhat popular with Playstation 3 Linux users, as you have 256 MB RAM + 256 MB video memory there. Unfortunately, data transfer from video memory to the CPU is slow on the PS3.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.