Re: [maemo-developers] swapfile is a huge improvement!

2006-01-21 Thread Danny Milosavljevic
Hi,

Am Sonntag, den 15.01.2006, 18:33 +0200 schrieb Juha Yrjölä:
> On Sat, 2006-01-14 at 11:55 -0500, ext Vladislav Grinchenko wrote:
> 
> > with swap on, what happens to the system when you manually remove the
> > mmc card? Or when you connect the USB cable to the unit?
> 
> Removing the MMC card will definitely cause Bad Things to happen.  It's
> also very tricky to protect against the Bad Things.
> 
> The system should listen on the MMC cover events, and turn off swap
> whenever the MMC cover is opened (which means we have a risk of the card
> departing).  Then the system should hurry to swap in all the pages on
> the MMC partition, which can take a *long* time depending on the amount
> of pages on swap.  

That's okay, put a RED LED next to the MMC card that can only be seen
when the slot is open :)

And when user isn't supposed to remove card, light it (on activity, or
when used for swap)... The one who still removes it deserves anything
happening after that ...

> Then, most likely, physical memory would run out.  At
> that point we are in a very bad situation indeed, if pages from some
> critical system processes are still swapped out.

Yeah ...

> 
> USB Mass Storage is not a problem if the swap resides on a separate
> partition.
> 
> Cheers,
> Juha

cheers,
   Danny


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


RE: [maemo-developers] swapfile is a huge improvement!

2006-01-18 Thread Dirk Kuijsten
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED] [mailto:maemo-developers-
> [EMAIL PROTECTED] Namens Andy
> Verzonden: dinsdag 17 januari 2006 5:14
> Aan: maemo-developers@maemo.org
> Onderwerp: Re: [maemo-developers] swapfile is a huge improvement!
> 
> On Sat, 2006-01-14 at 01:30 -0700, Brad Midgley wrote:
> > hey
> >
> > I decided to try the swap partition on my flash card and it made a HUGE
> > difference. Even with only 25mb swap (30mb wouldn't work for me), now
> > memory is not nearly the concern it was. I can run multiple apps, look
> > at complex pdf documents, etc. Just like I expected my 770 to do in the
> > first place!
> 
> What do you mean "30mb wouldn't work"?  I put a 32meg swapFILE on the
> 64meg mmc I received and it worked fine (/proc/meminfo and /proc/swaps
> showed swap usage, and I could get numerous things running with out
> problems.  Now I'm trying to partition a 512meg MMC into two partitions,
> and neither 128meg nor 64meg of swap as a dedicated partition
> (/dev/mmcblk0p2) works.  As soon as I issue swap on, the "low on memory,
> close some applications" window pops up.  I can immediately exit the
> shell, but if I wait too long, I start getting "sh: can't fork" (a usual
> OOM sign).  If I can get back to the home interface, I can't do anything
> and it keeps telling me "Not enough memory" or some such.  It did
> hardcrash, auto-reboot at one point also (I assume an OOM condition).
> 
> Is there some upper limit on the size of the allowed swap file on this
> arch?  I could get 32meg to work, but you say you couldn't get 30?
> 
> I swear I saw something about the max size of the swap file for the 770,
> but I can't find it now.
> 
> --
> Andy <[EMAIL PROTECTED]>
> 
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers

I have a 32MB swap file working great using the trick to first setup a
smaller swap file (100kb).
After you swapon the small file, wait 15 seconds, then swapon your large
swap file and you can swapoff the small file.

I don't know if this solves anything for swap partitions.

See daf's post at:
http://www.internettablettalk.com/forums/showpost.php?p=4079&postcount=16
in this thread:
http://www.internettablettalk.com/forums/showthread.php?t=602&page=2&pp=10 

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-17 Thread Kimmo Hämäläinen
On Mon, 2006-01-16 at 21:32, ext Israel Herraiz wrote:
> Dave Neuer wrote:
> > Does this include the "door is open/closed" information? Where is that
> > documented?
> 
> In the latest firmware, there are scripts which are executed when those
> events occurr. Take a look at /usr/sbin/osso-{mmc-mount, mmc-umount,
> cover-open,cover-closed,usb-cable-attached,usb-cable-dettached,etc}.sh
> 
> Well, maybe it is not the paradise of documentation, but at least from
> the names you can figure out how to execute something when such events
> occur ;-).

I'm working on getting the code published.

BR; Kimmo

> 
> Regards,
> Israel Herraiz
> 
> __
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-17 Thread Brad Midgley
Andy

> What do you mean "30mb wouldn't work"?  I put a 32meg swapFILE on the
> 64meg mmc I received and it worked fine (/proc/meminfo and /proc/swaps
> showed swap usage, and I could get numerous things running with out
> problems.  Now I'm trying to partition a 512meg MMC into two partitions,
> and neither 128meg nor 64meg of swap as a dedicated partition
> (/dev/mmcblk0p2) works.  As soon as I issue swap on, the "low on memory,
> close some applications" window pops up.

I was always trying a swap partition. I had the same issues you're
reporting with constant out-of-memory alerts coming up when my partition
was 30mb but they went away and things started performing when it was
down at 25mb.

I wanted to have a swap partition rather than a swapfile inside the fat
partition because I don't want things to blow up when I plug to in to a
host via usb.

Brad
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Andy
On Sat, 2006-01-14 at 01:30 -0700, Brad Midgley wrote:
> hey
> 
> I decided to try the swap partition on my flash card and it made a HUGE
> difference. Even with only 25mb swap (30mb wouldn't work for me), now
> memory is not nearly the concern it was. I can run multiple apps, look
> at complex pdf documents, etc. Just like I expected my 770 to do in the
> first place!

What do you mean "30mb wouldn't work"?  I put a 32meg swapFILE on the
64meg mmc I received and it worked fine (/proc/meminfo and /proc/swaps
showed swap usage, and I could get numerous things running with out
problems.  Now I'm trying to partition a 512meg MMC into two partitions,
and neither 128meg nor 64meg of swap as a dedicated partition
(/dev/mmcblk0p2) works.  As soon as I issue swap on, the "low on memory,
close some applications" window pops up.  I can immediately exit the
shell, but if I wait too long, I start getting "sh: can't fork" (a usual
OOM sign).  If I can get back to the home interface, I can't do anything
and it keeps telling me "Not enough memory" or some such.  It did
hardcrash, auto-reboot at one point also (I assume an OOM condition).

Is there some upper limit on the size of the allowed swap file on this
arch?  I could get 32meg to work, but you say you couldn't get 30?

I swear I saw something about the max size of the swap file for the 770,
but I can't find it now.

-- 
Andy <[EMAIL PROTECTED]>

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Dave Neuer
On 1/16/06, Dave Neuer <[EMAIL PROTECTED]> wrote:
>
> E.g., I asked for pointers to info like the above before (even just a
> description of the FIASCO components and info like size constraints),
> and the only answer I got was someone I believe was not a Nokia
> employee and which said "search the mail archives" and had a pointer
> to the flasher-tool howto.

My apologies to Devesh, who upon review appears to be a Nokia employee
and whose answer (also upon review) was a little more informative and
helpful than I recalled.

Also thanks to Israel for his follow-up to this thread.

Dave
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Israel Herraiz
Dave Neuer wrote:
> Does this include the "door is open/closed" information? Where is that
> documented?

In the latest firmware, there are scripts which are executed when those
events occurr. Take a look at /usr/sbin/osso-{mmc-mount, mmc-umount,
cover-open,cover-closed,usb-cable-attached,usb-cable-dettached,etc}.sh

Well, maybe it is not the paradise of documentation, but at least from
the names you can figure out how to execute something when such events
occur ;-).

Regards,
Israel Herraiz


signature.asc
Description: OpenPGP digital signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Brad Midgley
Urho

> If user has swapon. User opens MMC door. System pops up a large RED GUI
> that states: You have swap active. Please turn off swap before removing
> MMC from the slot. GUI would have one large button (turn off swap).
> After swapoff, GUI would turn green and say, it's safe to detach MMC now.

if a user opens the door, you must assume they are going to eject the
card. this is what nokia does with the fat partition. you should pop up
your gui and make a beep and run swapoff. the message should say 'do not
eject the card yet'

i believe it's possible for swapoff to fail if memory is overcommitted,
so you have another case to worry about. the device should tell you
you'll have to close apps or turn off the nokia first and possibly give
you buttons to do that.

> On USB cable insertion, the same GUI would popup and tell user that MMC
> cannot be mounted on PC until swap is off. Again, nice large button to
> turn swap off.

why bother the user? we should be using a swap partition--not a swapfile
on the fat fs--right? every usb-host OS will leave the swap partition
alone by default.

> When MMC inserted back from either USB connection or physically, system
> would check if previous state was swapon and popup a gui asking if swap
> should be resumed.

i would make the swapon automatic whenever a swap partition is found on
rsmmc, but then it could be a 'remember this decision' checkbox on your gui.

brad
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Kalle Vahlman
On 1/16/06, Dave Neuer <[EMAIL PROTECTED]> wrote:
> I think Nokia has done a lot of things right w/ the 770, but I do have
> to say that I think the idea that the 770 will be a huge consumer
> success by being more "like a phone" than "like a computer" is wrong.

Yeah, the huge consumer success they prepared for by manufacturing a
big batch of devices straight off so everyone would get theirs. Oh,
wait! ;)

> Most of the people I've showed the 770 to have been confused about
> what it would be useful for.

Judging from the LugRadio interview while back, the guys just hacked
around and it suddenly became the 770. So I'm not so sure even Nokia
has a clear goal for the device (apart from the obvious web
applications) but are instead hoping it would find one with the help
of open source community. And I've already heard dozens of interesting
ideas how it could be utilized, so it's probably working :)

(Obligatory disclaimer: this is a personal view and not connected in
any way to the company mentioned below)

--
Kalle Vahlman, [EMAIL PROTECTED]
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Juha Yrjölä
On Mon, 2006-01-16 at 11:12 -0500, Dave Neuer wrote:

> But, where a developed market for the device doesn't exist, one has to
> seriously ask the question whether simplicity and reliability are a
> substitute for flexibility and openess to experimentation, with the
> risk that the complexities inherent in a flexible,
> not-as-intuitive-as-a-phone device will sometimes cause problems for
> some users.

We're not going to start limiting anyone's experimentation.  Maemo is a
very open platform and experimentation with it rather easy.

The users can make their devices as complex they want (and possibly as
unstable).  We're responsible of keeping the software _we_ ship stable.

> > The issues regarding what happens when a swap device disappears from
> > underneath have to fixed first.
> 
> Is there a roadmap for solving that problem? Will it be solved on
> LKML, or by Nokia in-house? Or will Nokia open up the device specs &
> software more so developers can experiment with neat little tricks
> when the door opens/cards are inserted, etc. so that anyone is able to
> happily stumble upon the "right solution?"

_More_?  What on earth could you still want?  We use standard kernel
interfaces as much as possible, and the kernel source is freely
available.  Even loading and booting a custom kernel is extremely
simple:

# flasher -k /path/to/zImage -lb

User-space will get notifications about the MMC events through the
standard uevent interface.

As for where this problem might be solved, LKML is definitely the right
place.  I'm not yet personally convinced on the merits of having swap on
MMC, but anyone who is can of course start the thread.

> It's cool to me precisely because it's a computer but fits in my
> pocket, and I can do almost anything with it that I can do with my
> computer.

It's cool to me precisely for the same reason.  But, as you probably
realize, different people value different things.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Dave Neuer
On 1/16/06, Juha Yrjölä <[EMAIL PROTECTED]> wrote:
> On Mon, 2006-01-16 at 13:55 +0200, ext Urho Konttori wrote:
>
> > This is just a suggestion, but could the following be safe enough for
> > consumer grade swap use on Nokia 770:
> >
> > If user has swapon. User opens MMC door. System pops up a large RED
> > GUI that states: You have swap active. Please turn off swap before
> > removing MMC from the slot. GUI would have one large button (turn off
> > swap). After swapoff, GUI would turn green and say, it's safe to
> > detach MMC now.
>
> We really can't rely on the user nicely waiting for any kind of
> permission from our UI.  There _will_ be cases when the MMC is abruptly
> removed.  It is unacceptable for an end-user device to go down in flames
> whenever this happens.

Well, if by end user device, you mean "something as simple as a
phone," certainly. However, all kinds of nasty things can happen to a
desktop PC if a user does something stupid, and still PCs are hugely
useful devices which a growing majority of even non-technically minded
people in the developed world own.

I understand that Nokia would probably like the appeal of the 770 to
be similar to the appeal of their phones; it does what you expect and
just works. But the fact is, the 770 isn't a phone. I know, it's not a
desktop PC, either.

But, where a developed market for the device doesn't exist, one has to
seriously ask the question whether simplicity and reliability are a
substitute for flexibility and openess to experimentation, with the
risk that the complexities inherent in a flexible,
not-as-intuitive-as-a-phone device will sometimes cause problems for
some users.

>
> The issues regarding what happens when a swap device disappears from
> underneath have to fixed first.

Is there a roadmap for solving that problem? Will it be solved on
LKML, or by Nokia in-house? Or will Nokia open up the device specs &
software more so developers can experiment with neat little tricks
when the door opens/cards are inserted, etc. so that anyone is able to
happily stumble upon the "right solution?"

I think Nokia has done a lot of things right w/ the 770, but I do have
to say that I think the idea that the 770 will be a huge consumer
success by being more "like a phone" than "like a computer" is wrong.
Most of the people I've showed the 770 to have been confused about
what it would be useful for. For me, it's useful precisely because
it's cool and more-or-less hackable, and I might find something really
great to do with it, not because it plays songs (iPods and even
cheaper devices lining the shelves at Best Buy play songs, and the
iPod has iTunes) or lets me check my mail or surf the web (I can do
that at work or at home) or listen to Internet radio (is there even
anything on internet radio I want to listen to?).

It's cool to me precisely because it's a computer but fits in my
pocket, and I can do almost anything with it that I can do with my
computer.

Sorry for wandering a bit from the particular topic (swap).

Dave
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Frantisek Dufka
Well it is solvable but hard. You could halt everything and display 
something like 'Poor human, give me my card back or I will reboot'. But 
this has to be done in low level (kernel thread?, direct framebuffer 
access?) because anything in userspace can segfault when swap is removed.


I know similar things worked on Amiga. You removed floppy when writing 
and it opened a dialog 'error writing sector x, please insert disk' and 
when you gave it back it worked and continued. Or when the disk was full 
in the middle of writing of one file you could let the dialog be, delete 
other files and click continue and it worked. Never seen this type of 
recovery later on any newer system :-)


Frantisek

Juha Yrjölä wrote:


We really can't rely on the user nicely waiting for any kind of
permission from our UI.  There _will_ be cases when the MMC is abruptly
removed.  It is unacceptable for an end-user device to go down in flames
whenever this happens.

The issues regarding what happens when a swap device disappears from
underneath have to fixed first.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Juha Yrjölä
On Mon, 2006-01-16 at 13:55 +0200, ext Urho Konttori wrote:

> This is just a suggestion, but could the following be safe enough for
> consumer grade swap use on Nokia 770:
> 
> If user has swapon. User opens MMC door. System pops up a large RED
> GUI that states: You have swap active. Please turn off swap before
> removing MMC from the slot. GUI would have one large button (turn off
> swap). After swapoff, GUI would turn green and say, it's safe to
> detach MMC now.

We really can't rely on the user nicely waiting for any kind of
permission from our UI.  There _will_ be cases when the MMC is abruptly
removed.  It is unacceptable for an end-user device to go down in flames
whenever this happens.

The issues regarding what happens when a swap device disappears from
underneath have to fixed first.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Urho Konttori




Israel Herraiz wrote:

  Larry Battraw wrote:
  
  
hangup is having to manually remount it after a reboot, but it's worth
the trouble.  A GUI tool for toggling swap and mounts would sure be
neat! 

  
  
Well, not properly a GUI tool but two menu entries for adding and
removing swap, I think this could useful for you [1].

I turn on swap only when I need it (for example, I am reading a PDF,
listening to MP3 and browsing the web), and turn off when I need for
example to remove the card.

Regards,
Israel Herraiz

This is just a suggestion, but could the following be safe enough for
consumer grade swap use on Nokia 770:

If user has swapon. User opens MMC door. System pops up a large RED GUI
that states: You have swap active. Please turn off swap before removing
MMC from the slot. GUI would have one large button (turn off swap).
After swapoff, GUI would turn green and say, it's safe to detach MMC
now.

On USB cable insertion, the same GUI would popup and tell user that MMC
cannot be mounted on PC until swap is off. Again, nice large button to
turn swap off.

When MMC inserted back from either USB connection or physically, system
would check if previous state was swapon and popup a gui asking if swap
should be resumed. 

Kind regards,
Urho Konttori




___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Israel Herraiz
Larry Battraw wrote:
> hangup is having to manually remount it after a reboot, but it's worth
> the trouble.  A GUI tool for toggling swap and mounts would sure be
> neat! 

Well, not properly a GUI tool but two menu entries for adding and
removing swap, I think this could useful for you [1].

I turn on swap only when I need it (for example, I am reading a PDF,
listening to MP3 and browsing the web), and turn off when I need for
example to remove the card.

Regards,
Israel Herraiz

[1] http://n770.herraiz.org/archives/15


signature.asc
Description: OpenPGP digital signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-16 Thread Dave Neuer
On 1/14/06, Juha Yrjölä <[EMAIL PROTECTED]> wrote:
> On Sat, 2006-01-14 at 10:33 +, ext Clemens Eisserer wrote:
>
> > But keep in mind that a swap-file means meany reads/writes to the same
> > areas of flash which will for sure lead to the death of the mmc later
> > or sooner.
>
> Not really, since the flash controller on an MMC card is supposed to do
> wear-levelling. The FAT blocks, for example, would die pretty quickly
> otherwise, since they're written to very often.

So, is there any benefit to JFFS2 on MMC other than compression (which
I guess for swap is either not necessary or even counter-productive)?

Dave
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-15 Thread Armin M. Warda
On Saturday 14 January 2006 20:32, Larry Battraw wrote:
> A GUI tool for toggling swap and mounts would sure be neat! 

Yes. I would like to add this feature to the CPU/Mem/Screenshot applet 
alias Load-Plugin, but unfortunately it seems that the source code is 
not available. I contacted the author but did not yet get a reply.

http://maemo.org/maemowiki/ApplicationCatalog#head-2a148fa70a8fd181ef6b85fb568785cd31a45e02
http://koti.welho.com/jpavelek/tmp/770/

  Armin.

-- 
   --- May the Source be with you! Linux. ---
   --- http://www.arminwarda.mynetcologne.de/
   --- secure eMail: http://www.gnupg.de/ ---


pgpXCufadw2jq.pgp
Description: PGP signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-15 Thread Juha Yrjölä
On Sat, 2006-01-14 at 10:10 -0500, ext Dave Neuer wrote:

> > Not really, since the flash controller on an MMC card is supposed to do
> > wear-levelling. The FAT blocks, for example, would die pretty quickly
> > otherwise, since they're written to very often.
> 
> So, is there any benefit to JFFS2 on MMC other than compression (which
> I guess for swap is either not necessary or even counter-productive)?

Some MMC card manufacturers might have a poor wear-levelling
implementation.  In these cases a wear-levelling file system might be
appropriate.  However, if such cards should exist, they would die pretty
quickly (relatively speaking) with regular FAT usage, too, so I'm
guessing they're pretty rare.

If someone has a cheapo card, they should be able to check if the
wear-levelling works by writing and rewriting the same block on the card
100,000+ times (through the block layer, not through a file system). =)
If the block doesn't go bad, wear-levelling does indeed work.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-15 Thread Juha Yrjölä
On Sat, 2006-01-14 at 11:55 -0500, ext Vladislav Grinchenko wrote:

> with swap on, what happens to the system when you manually remove the
> mmc card? Or when you connect the USB cable to the unit?

Removing the MMC card will definitely cause Bad Things to happen.  It's
also very tricky to protect against the Bad Things.

The system should listen on the MMC cover events, and turn off swap
whenever the MMC cover is opened (which means we have a risk of the card
departing).  Then the system should hurry to swap in all the pages on
the MMC partition, which can take a *long* time depending on the amount
of pages on swap.  Then, most likely, physical memory would run out.  At
that point we are in a very bad situation indeed, if pages from some
critical system processes are still swapped out.

USB Mass Storage is not a problem if the swap resides on a separate
partition.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-14 Thread Larry Battraw
  From what I remember when I've tried it, it generally crashes/reboots when you remove the card.  Can't remember if the same thing happens when you insert the USB cable.  I've found a way around the problems with it unmounting because of the USB cable: I created a second partition (it's a 1GB card) and made the swapfile there.  I can use ext3 to get proper permissions/execute support as well, so it's quite nice.  The only hangup is having to manually remount it after a reboot, but it's worth the trouble.  A GUI tool for toggling swap and mounts would sure be neat!  Removing the card while the second partition is mounted is not a good idea and sometimes it takes a reboot to fix it.
LarryOn 1/14/06, Vladislav Grinchenko <[EMAIL PROTECTED]> wrote:
Brad,with swap on, what happens to the system when you manually remove themmc card? Or when you connect the USB cable to the unit?-VladOn Sat, 2006-01-14 at 03:30, Brad Midgley wrote:> hey
>> I decided to try the swap partition on my flash card and it made a HUGE> difference. Even with only 25mb swap (30mb wouldn't work for me), now> memory is not nearly the concern it was. I can run multiple apps, look
> at complex pdf documents, etc. Just like I expected my 770 to do in the> first place!>> I think the vm may need to be tuned if nokia plans to keep shipping> these things with 64mb and no swap. Swap changes the character of the
> vm, so even adding ram may not whip things into shape in the same way.>> Brad> ___> maemo-developers mailing list> 
maemo-developers@maemo.org> https://maemo.org/mailman/listinfo/maemo-developers--_
Vladislav Grinchenko   http://home.comcast.net/~3rdshift/ e-mail: [EMAIL PROTECTED]
  Focus on quality, and productivity will follow.maemo-developers mailing list
maemo-developers@maemo.orghttps://maemo.org/mailman/listinfo/maemo-developers
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-14 Thread Brad Midgley
Vladislav

> with swap on, what happens to the system when you manually remove the
> mmc card? Or when you connect the USB cable to the unit?

I am pretty sure the nokia will just crash if I eject it when swap is
active. We need to latch into the cardslot-opening and -closing events
if we want to handle this right (and display a busy... dialog while the
swapoff is working and a dialog if swapoff fails...)

Plugging it into a host is no trouble. The data partition is unmounted
on the 770 side and I can use it from the host. Fortunately, the os is
not trying to outsmart me by turning off swap as well when it unmounts
the partition. That would not be good.

Of course the host pc sees the whole card and can see there's a swap
partition but I didn't try accessing it from the host. In fact, when I
was starting from a card with just one fat partition I just plugged the
nokia (with card inserted) into my linux machine and did the
repartitioning and mkdosfs/mkswap from the host pc.

brad
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-14 Thread Vladislav Grinchenko
Brad,

with swap on, what happens to the system when you manually remove the
mmc card? Or when you connect the USB cable to the unit?

-Vlad

On Sat, 2006-01-14 at 03:30, Brad Midgley wrote:
> hey
> 
> I decided to try the swap partition on my flash card and it made a HUGE
> difference. Even with only 25mb swap (30mb wouldn't work for me), now
> memory is not nearly the concern it was. I can run multiple apps, look
> at complex pdf documents, etc. Just like I expected my 770 to do in the
> first place!
> 
> I think the vm may need to be tuned if nokia plans to keep shipping
> these things with 64mb and no swap. Swap changes the character of the
> vm, so even adding ram may not whip things into shape in the same way.
> 
> Brad
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers
-- 
_
Vladislav Grinchenko   http://home.comcast.net/~3rdshift/
 e-mail: [EMAIL PROTECTED]
   
  Focus on quality, and productivity will follow.
_

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-14 Thread Juha Yrjölä
On Sat, 2006-01-14 at 10:33 +, ext Clemens Eisserer wrote:

> But keep in mind that a swap-file means meany reads/writes to the same
> areas of flash which will for sure lead to the death of the mmc later
> or sooner.

Not really, since the flash controller on an MMC card is supposed to do
wear-levelling. The FAT blocks, for example, would die pretty quickly
otherwise, since they're written to very often.

Cheers,
Juha


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] swapfile is a huge improvement!

2006-01-14 Thread Clemens Eisserer
Yep you're right - it runs as long smooth as long as your mmc is
willing to play.
But keep in mind that a swap-file means meany reads/writes to the same
areas of flash which will for sure lead to the death of the mmc later
or sooner.

lg Clemens

2006/1/14, Brad Midgley <[EMAIL PROTECTED]>:
> hey
>
> I decided to try the swap partition on my flash card and it made a HUGE
> difference. Even with only 25mb swap (30mb wouldn't work for me), now
> memory is not nearly the concern it was. I can run multiple apps, look
> at complex pdf documents, etc. Just like I expected my 770 to do in the
> first place!
>
> I think the vm may need to be tuned if nokia plans to keep shipping
> these things with 64mb and no swap. Swap changes the character of the
> vm, so even adding ram may not whip things into shape in the same way.
>
> Brad
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers