Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271138 - Add support for Playstation 3's VRAM as swap
Summary: Add support for Playstation 3's VRAM as swap
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: PPC64 Linux
: High enhancement
Assignee: Brent Baude (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-24 21:16 UTC by Ian Leonard
Modified: 2010-03-30 00:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
init script to setup PS3's vram as swap (swap-ps3vram,249 bytes, text/plain)
2009-05-24 21:22 UTC, Ian Leonard
Details
2 udev rules to handle /dev/ps3vram (10-ps3vram.rules,508 bytes, text/plain)
2009-05-24 21:26 UTC, Ian Leonard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Leonard 2009-05-24 21:16:16 UTC
Linux kernel 2.6.29 released with an option to have the Playstation 3's unused vram as a block device. It is 256MB of otherwise unused memory. A common use for it is as swap, but this needs to be recreated with every boot. Two methods of doing this are through a udev rule or an init script. I don't know the best way to have this incorporated into Gentoo, or if it even should be. I'm leaving the work here for someone else to decide.

Reproducible: Always

Steps to Reproduce:
1. Boot a PS3 with kernel 2.6.29 and CONFIG_PS3_VRAM enabled.
Comment 1 Ian Leonard 2009-05-24 21:22:04 UTC
Created attachment 192334 [details]
init script to setup PS3's vram as swap
Comment 2 Ian Leonard 2009-05-24 21:26:40 UTC
Created attachment 192336 [details]
2 udev rules to handle /dev/ps3vram

These were originally put together by one of Sony's PS3 devs and put up here: http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-conf/ps3vram-swap.rules

My version has a typo fix in the second rule, allowing grep to accurately parse the /etc/fstab entry. My preference for if this makes its way into Gentoo proper is with the second udev rule.
Comment 3 Mike Auty (RETIRED) gentoo-dev 2009-05-25 15:57:53 UTC
This could probably also be achieved by adding the following to /etc/conf.d/swap

start_pre() {
  if [ -e /dev/ps3vram ]; then
    mkswap /dev/ps3vram >/dev/null
  fi
}

and using the standard fstab entry.

I believe that works for older versions of baselayout as well as for openrc, but it saves the need for a completely new init script (and trying to figure out which package it should be a part of).

I'm going to assign this to the people who handle ps3pf_utils since they're the only other playstation 3 related package I can find in the tree.  Perhaps it would be worth making a ps3 project?
Comment 4 Ian Leonard 2009-11-26 22:17:50 UTC
For what it's worth, I've been using the /etc/conf.d/swap method for the last several months without issue.
Comment 5 Ian Leonard 2010-03-30 00:55:22 UTC
I'm withdrawing my request as Sony is abandoning the platform.