View Single Post
  #8 (permalink)  
Old 12-17-2010, 12:27 AM
tiger2wander's Avatar
tiger2wander
PPCGeeks Regular
Offline
 
Join Date: Feb 2009
Posts: 107
Reputation: 150
tiger2wander is keeping up the good worktiger2wander is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Post Re: Test with framebuffer

Quote:
Originally Posted by InvincibleLiving View Post
Hey Tiger, I want to know more about the swapfile you referenced, can you share? TIA
Yeah, I've got it by create a swapfile at /sdcard/swapfile by `dd` command on the my Linux box:
Code:
dd if=/dev/zero of=$HOME/swapfile bs=1M count=64
and then make Swap FS with that file
Code:
mkswap -f $HOME/swapfile
Then modified froyo.user.conf to look like this:
Code:
# custom shell commands, these commands run last
custom_shells{
  chmod 777 /etc/dbus.conf

  echo "Remove dirty files"
  rm /sdcard/FSCK*.REC
  rm /sdcard/fsck*.rec

  echo "Copy hosts to remove ad"
  cp -fv /sdcard/tools/etc/hosts /data/etc/hosts
  cp -fv /sdcard/tools/etc/hosts /system/etc/hosts
  
  echo "Mounting external mods."
  mount --bind /sdcard/mods/libGLES_qcom.so.11.29.10 /system/lib/egl/libGLES_qcom.so
  mount --bind /sdcard/mods/gralloc.msm7k.so /system/lib/hw/gralloc.msm7k.so
  mount --bind /sdcard/mods/build.prop /system/build.prop
  
  echo "Mounting swapfile on /sdcard/swapfile"
  swapon /sdcard/swapfile
}
I was move all the test drivers to /sdcard/mods to get more clean look at root of my sdcard, also I have done with some tricks to remove some dirty files generated while fsck is run, mapped hosts file to remove ad from application...

Also, I was modified block "swap_file" to look like this:
Code:
#create swap file for compcache or linux swap
swap_file{
  swap_file_en=1  # set to 1 to create swap file
        # set to 0 to del the swap file
  linux_swap_file_size=64 # swap file size in MB
  linux_swap_file=/sdcard/swapfile  # pointing to the swap file location ( must be /system/sd/)
}
But seen its look not make any sense and kernel not go to use swap, just ignore it.

This is block I was modified to make kernel using more swap when more applications running to give more ram for focusing activity:
Code:
#virtual memory 
sys_vm{        
  sys_vm_en=1 # enable(1) or disable(0) virtual memory configurations
  swappiness=20 # default 60
  page_cluster=0  # default 3, (0 since CM3.9.6+)
  laptop_mode=5 # default 0
  dirty_expire_centisecs=3000 # default 3000
  dirty_writeback_centisecs=1500  # default 500
  dirty_background_ratio=3  # default 5
  dirty_ratio=5 # default 10
  vfs_cache_pressure=200  # default 100 (tendency of the kernel to reclaim cache memory)
  overcommit_memory=1 # default 0 (0=Heuristic 1=Always overcommit 2=Don't overcommit)
  overcommit_ratio=80 # default 50 (% of Physical+Virtual memory to allow allocation)
}
That is what's I've done. I have attach my froyo.user.conf and swapfile as you need to make it. (Good for M$'s user which not have dd tool already :P )
Attached Files
File Type: zip froyo.user.conf.zip (1.2 KB, 2 views) Click for barcode!
File Type: zip swapfile.zip (63.8 KB, 2 views) Click for barcode!
__________________
Reply With Quote
This post has been thanked 1 times.