I am well familiar with flash and kernel and swapping. I am unfamiliar with
android kernel patches and userspace, hence the question.
the device has a hard-disk, so wear is not an issue. I mount swap in
android's init in the ramdisk and it indeed is enabled (as seen by runnig
top on serial console)

----
Best Regards


On Mon, Sep 6, 2010 at 2:38 PM, Brad Davis <bda...@cove-mtn.com> wrote:

> You also need to bind swap to disk partitions and/or files (I can't
> help you here as I don't do this on Linux kernels with fancy
> bootloaders...).
>
> Again, don't do this on flash unless you are ready to replace the
> flash often.  Swap heavily writes (if you have the memory to cache the
> swap, then don't swap) the disk, which is extremely slow on flash and
> the flash will break after a relatively small number of writes.
>
> I can't tell you much about the swap subsystem on Linux, but it is
> possible that swapping to a flash partition will bypass the code that
> handles bad flash blocks.
>
> Swapping to a flash file may double the actual number of writes
> (because of the interaction between writing single blocks in the file
> and the way flash file systems work), killing the flash faster.
>
> Has Android been tested with swapping?  Probably not, it is an
> embedded system, not a general purpose OS  (I know I wouldn't expend
> any resources testing it).  It may work, but then again, the Google
> additions to the standard kernel may prevent swapping from working
> properly (after all, swapping is turned off for kernel development and
> testing).  Did the kernel engineers plan to disable swapping?,
> probably not, but kernels are complex masses of code and things
> happen.
>
> I just checked my Ubuntu desktop.  It is using 1gig of memory (no swap
> because my machine has 3gig) of which about 45meg is the X server and
> another 66+meg is Gnome.  A full Unbuntu desktop would thrash 16meg to
> death...  (Firefox alone uses almost 200meg of virtual memory.)  (I
> have actually used X/Motif on 16meg machines and we didn't get to have
> all the eye-candy that people now expect.)
>
> That said, if you have a hard disk installed or you swap over the
> network, you need to understand and modify the Android partitions
> (which were set up for flash) and possibly the mount code in init.rc.
> It probably isn't hard, but I doubt that many people are doing this
> (Android is a battery OS and dependencies on networks and disks don't
> work well on batteries).
>
> So, if you don't understand swapping and don't understand flash/flash
> file systems, you are probably going to have to learn a bunch.  You
> have probably alone in your endeavors as the rest of the Android
> community isn't going to swap  (I can tell you what it takes to
> support a 5:5:5 screen).
>
> Good Luck.
>
> On Sep 5, 7:11 pm, Dmitry Grinberg <dmitr...@gmail.com> wrote:
> > My kernel has swap enabled.
> >
> > ----
> > Best Regards
> >
> > On Sun, Sep 5, 2010 at 4:34 PM, Brad Davis <bda...@cove-mtn.com> wrote:
> > > I don't think the standard Android kernel has swap enabled and/or
> > > configured (and you don't want to swap to flash as you will quickly
> > > kill the flash).
> >
> > > And yes, I've watched memory usage as Android boots and you need 64mb.
> >
> > > --
> > > unsubscribe: 
> > > android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> <android-porting%2bunsubscr...@googlegroups.com<android-porting%252bunsubscr...@googlegroups.com>
> >
> > > website:http://groups.google.com/group/android-porting
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to