Reply
Thread Tools
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#11
The rootfs uses a compressed filesystem (ubifs), so while a swap file filled with zeros might fit, it might run out of space when real data goes into it. It's also possible ubifs wants to allocate memory during writes, in which case swapping to it would be unsafe.
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#12
Originally Posted by lma View Post
The rootfs uses a compressed filesystem (ubifs), so while a swap file filled with zeros might fit, it might run out of space when real data goes into it. It's also possible ubifs wants to allocate memory during writes, in which case swapping to it would be unsafe.
Ah, the UBIFS makes total sense, thank you for the tip! When rootfs filled Unix halts and hence the phone reboots Thank you.

Last edited by pablocrossa; 2012-06-04 at 16:36.
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#13
I think the kernel (maybe not the one in the N900) has a mtdswap module that allows you to put swap on an mtd device (rootfs).

The idea is really good. Imagine using a chunk of your rootfs (say, 32MB) as compressed swap.
 
mrsellout's Avatar
Posts: 889 | Thanked: 2,087 times | Joined on Sep 2010 @ Manchester
#14
Originally Posted by reinob View Post
I think the kernel (maybe not the one in the N900) has a mtdswap module that allows you to put swap on an mtd device (rootfs).

The idea is really good. Imagine using a chunk of your rootfs (say, 32MB) as compressed swap.
On the n9/n950 the nand chip contains the swap, while they've also used ramswap (or compcache I think) to inflate the size of ram.

With hindsight, Konttori mentioned that they should've done the same (ie stuck the swap on the nand and the rootfs on the emmc) for the n900.

I wonder if that could be an avenue for people to explore with the n900.

Read his posts from here on:
http://mg.pov.lt/maemo-irclog/%23mae...06-20T23:01:52
 

The Following User Says Thank You to mrsellout For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#15
Originally Posted by reinob View Post
I think the kernel (maybe not the one in the N900) has a mtdswap module that allows you to put swap on an mtd device (rootfs).

The idea is really good. Imagine using a chunk of your rootfs (say, 32MB) as compressed swap.
Not our kernel, a way newer one in mainline (and the Nokia kernel on the N9/50, 2.6.32)
The Mer kernel doesn't have it, the Mer-3.x kernel probably does.

Either way, it'll need to be backported to be used, and Maemo moved off the rootfs to do so.

(Side note: I actually tried booting Harmattan on the N900 using the MeeGo CE kernel. When booting back to Maemo, I noticed that everything was crashing randomly. #maemo said that it probably tried to swap on mtd5. Lucky that Nokia didn't use any other partition as swap, as that could've been nasty for my phone.)
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:16.