Active Topics

 


Reply
Thread Tools
Hedgecore's Avatar
Posts: 1,361 | Thanked: 115 times | Joined on Oct 2005 @ Toronto, Ontario, Canada
#1
Admittedly, I've been staying away from the finer details of software development on the 770 as it could be some time before I finally get one, but has there been any/is there any work being done to allow the device to use a swap partition on an RSMMC card? Is this even feasible? I realize that would rely on the somewhat underpowered processor, but at least it'd be some extra memory.
 
Posts: 1,038 | Thanked: 737 times | Joined on Nov 2005 @ Helsinki
#2
I think they are afraid what happens when you pull out the mmc. Mmc is now hot swappable, but it wouldn't be anymore if it could contain swap. Having said that, I think it's reasonable to assume that if you'd activate swap in some control panel, it could inform you that all bad things will happen shoud you remove the mmc while it's using the mmc as swap.
 
Posts: 211 | Thanked: 3 times | Joined on Oct 2005
#3
The commands are all there and should allow you to do this. I followed some instructions on the maemo developers list but it failed on the swapon command.

I have a feeling it may require full root access to work

And of course, as konttori points out, it will all go horribly wrong when someone pulls their mmc and half the OS has been swapped out
 
Posts: 12 | Thanked: 0 times | Joined on Dec 2005
#4
In a root shell I issued mkswap to my card, and when I tried the swapon, it rebooted the device.

Hopefully eventually a way will be determined to allow a swap partition to be setup on the mmc
 
Posts: 211 | Thanked: 3 times | Joined on Oct 2005
#5
I put the following into a file called swapper.sh which I copied to my 770 and put in my home directory.

dd if=/dev/zero of=/media/mmc1/swap bs=1024 count=16384
/sbin/mkswap /media/mmc1/swap 16384
/sbin/swapon /media/mmc1/swap

Then I:

1. Switched to R&D mode using the OSX Flasher
2. Started xterm
3. Did a cd to move to /home/user
4. ran chmod +x swapper.sh
5. ran sudo gainroot
6. ran ./swapper.sh

And it worked fine. What version are you running?
 
Hedgecore's Avatar
Posts: 1,361 | Thanked: 115 times | Joined on Oct 2005 @ Toronto, Ontario, Canada
#6
This idea will spawn two camps of people. Those who will say it's sacrelige to use up the limited internal space, and those who will remind me about the limited number of reads/writes.

Couldn't ya give it another 12 megs of swap space using the internal memory without having to worry about swapping RSMMCs?
 
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#7
First of all, even if it worked, I don't think setting up swap on the internal flash is a good idea, due to the read/write lifetime. Swapping on an RS-MMC, though, seems reasonable, since they are replaceable. In fact, I'm using the included MMC for that very purpose, since it's small and I intend to replace it anyway.

Crisis: your reboot issue is likely due to trying to create a swap file that is too large. For some reason, the device reboots if you try to activate too much swap within a certain amount of time. I'm found that sixteen megabytes per fifteen seconds is close to the limit. If you want more than sixteen megs, you need to create two or more swap files and swapon them with fifteen seconds of delay between each swapon. I think twenty-four meg swap files may work, too, but I usually stick with sixteen.
 
Posts: 84 | Thanked: 5 times | Joined on Oct 2005
#8
is there anyway to setup swap without doing all that crap to become root?Because I have the file on my MMC right now, but can't tell my 770 to use it.
 
Posts: 10 | Thanked: 0 times | Joined on Dec 2005
#9
Hmm, with kernels 2.6... Can I swap towards a networked file via the wifi?
 
Posts: 211 | Thanked: 3 times | Joined on Oct 2005
#10
Originally Posted by philmcneal
is there anyway to setup swap without doing all that crap to become root?Because I have the file on my MMC right now, but can't tell my 770 to use it.
Not as far as I know. The swapon command needs root access.

The only other way I know is to add it to /etc/fstab and then reboot and that (editing fstab) needs you to be root as well. Sorry

I now run my 770 in root enabled mode all of the time. Providing you don't do sudo gainroot I'd be surprised if you even see a difference.
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:47.