DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 8 of 8

Thread: 224 lines of kernel code to boost the Linux experience - would this apply to Android?

  1. Master Droid
    sarreq's Avatar
    Member #
    28254
    Join Date
    Jan 2010
    Location
    Philly
    Posts
    398
    Liked
    1 times
    Twitter
    @Sarreq
    Phone
    SammyGS3 / ParanoidAndroid2.54
    #1

    224 lines of kernel code to boost the Linux experience - would this apply to Android?

    http://www.phoronix.com/scan.php?pag...37_video&num=1

    I just saw this and was wondering if this patch would/could apply to the Android kernel as well. any kernel programmers out there who might know/be willing to find out?
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Droid
    KillerVamp's Avatar
    Member #
    55353
    Join Date
    Apr 2010
    Posts
    54
    Phone
    The Ultimate Droid 3.1.0
    #2
    From what I can tell it affects how the CPU is handled and processing time, so theoretically yes. But as android is a Java Stack, or basically a virtual machine, I am not entirely sure.
  4. Master Droid
    sarreq's Avatar
    Member #
    28254
    Join Date
    Jan 2010
    Location
    Philly
    Posts
    398
    Liked
    1 times
    Twitter
    @Sarreq
    Phone
    SammyGS3 / ParanoidAndroid2.54
    #3
    yes, but Dalvik runs on top of the kernel, right? if the kernel can be boosted, so would everything running on top of it, like Dalvik.
  5. Master Droid
    sarreq's Avatar
    Member #
    28254
    Join Date
    Jan 2010
    Location
    Philly
    Posts
    398
    Liked
    1 times
    Twitter
    @Sarreq
    Phone
    SammyGS3 / ParanoidAndroid2.54
    #4
    no one? p3? slayher? chevy? bueller? bueller? bueller?
  6. Master Droid
    meishkov's Avatar
    Member #
    37113
    Join Date
    Feb 2010
    Location
    Sterling Heights, MI
    Posts
    958
    Liked
    8 times
    Phone
    OG Droid
    #5
    This sounds like a great idea. I'd love if some research could get done on this...I'd be willing to help out and test some stuff.
  7. Master Droid
    sarreq's Avatar
    Member #
    28254
    Join Date
    Jan 2010
    Location
    Philly
    Posts
    398
    Liked
    1 times
    Twitter
    @Sarreq
    Phone
    SammyGS3 / ParanoidAndroid2.54
    #6
    an alternative which can be used now without a new kernel.
    same question, could this be adapted to android?


    Text quoted because the page seems to freeze my firefox
    Alternative To The "200 Lines Kernel Patch That Does Wonders" Which You Can Use Right Away

    Phoronix recently published an article regarding a ~200 lines Linux Kernel patch that improves responsiveness under system strain. Well, Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file. I know it sounds unbelievable, but apparently someone even ran some tests which prove that Lennart's solution works. Read on!

    Basically, Lennart explains you have to add this to your ~/.bashrc file (important: this won't work on Ubuntu. See instructions for Ubuntu further down the post!):

    Code:
    if [ "$PS1" ] ; then              mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$            echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks    fi
    And run the following commands as super user:
    Code:
    mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu mkdir -m 0777 /sys/fs/cgroup/cpu/user
    Further more, a reply to Lennart's email states that his approach is actually better then the actual Kernel patch

    I've done some tests and the result is that Lennart's approach seems to work best. It also _feels_ better interactively compared to the vanilla kernel and in-kernel cgrougs on my machine. Also it's really nice to have an interface to actually see what is going on. With the kernel patch you're totally in the dark about what is going on right now.
    -Markus Trippelsdorf
    The reply also includes some benchmarks you can see @ LKML: Markus Trippelsdorf: Re: [RFC/RFT PATCH v3] sched: automated per tty task groups

    Use it in Ubuntu


    Update (November 24): because many people had trouble following the instructions below, there is now a script that automatically does everything for you. See: Script To Automatically Apply the "200 Lines Kernel Patch" Alternative In Ubuntu


    To use Lennart's solution in Ubuntu (not tested - thanks to Lsh for this), you have to replace "/sys/fs" with "/dev". So you would have to add the following commands in your /etc/rc.local (open it with: sudo gedit /etc/rc.local) file, above the "exit 0" line:

    Code:
    mkdir -p /dev/cgroup/cpu mount -t cgroup cgroup /dev/cgroup/cpu -o cpu mkdir -m 0777 /dev/cgroup/cpu/user echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
    and make it executable:
    Code:
    sudo chmod +x /etc/rc.local
    And then add the following to your ~/.bashrc file (to open it: gedit ~/.bashrc):

    Code:
    if [ "$PS1" ] ; then      mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1    echo $$ > /dev/cgroup/cpu/user/$$/tasks    echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release fi
    Run the following command:
    Code:
    sudo gedit /usr/local/sbin/cgroup_clean
    And paste this:

    Code:
    #!/bin/sh if [ "$*" != "/user" ]; then rmdir /dev/cgroup/cpu/$* fi
    then save the file and make it executable:
    sudo chmod +x /usr/local/sbin/cgroup_clean
    And finally, restart the computer or manually run the /etc/rc.local file ("sudo /etc/rc.local").


    Update November 19: The above instructions have been updated again to "really" automatically remove empty cgroups (thank to Ricardo Ferreira using the instructions he sent.).



    Update 2: if you don't want to follow the manual steps above, you can use some patched kernels (Warning: use these at your own risk!!!) for Ubuntu 10.10:

    If you want to go even further and install a patched Kernel, you can download a "200 lines" patched Kernel (for 64bit only!) from HERE (thanks to accumulator @ Phoronix forums).


    Also, WebUpd8 reader Scott Franke shared a Kernel he patched with bfs with which he says he gets better performance then with the "200 lines patch". Download (also 64bit only!): 1 and 2 (both .deb files required).


    Both of the above 2 Kernels are for Ubuntu 10.10 only! Use them at your own risk!



    Read the discussion @ LKML: Markus Trippelsdorf: Re: [RFC/RFT PATCH v3] sched: automated per tty task groups | via Habrahabr.ru (thanks to Lsh)
  8. Master Droid
    meishkov's Avatar
    Member #
    37113
    Join Date
    Feb 2010
    Location
    Sterling Heights, MI
    Posts
    958
    Liked
    8 times
    Phone
    OG Droid
    #7
    Bump
    Is somebody maybe working on this?
  9. Super Moderator
    furbearingmammal's Avatar
    Member #
    78594
    Join Date
    Jun 2010
    Location
    So far north in NY I smell maple syrup when the wind blows out of the west.
    Posts
    10,371
    Liked
    32 times
    Twitter
    @FurryVarmint
    Premium Member
    #8
    Why don't you go post in the Developers section or ask for the thread to be moved there? That might speed things along. A PM to tanknspank might not be out of the question, either. He's very knowledgeable about the Android system's code.

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Linux Commands on Android
    By christim in forum Droid Hacks
    Replies: 16
    Last Post: 03-03-2012, 10:10 AM
  2. Possible uses for a Linux VM on Android ?
    By peterpressure in forum Droid Hacks
    Replies: 3
    Last Post: 08-29-2010, 10:30 PM
  3. How to apply Overclock and Kernel to ERE25 BB
    By gilbertorbea in forum Droid Hacks
    Replies: 0
    Last Post: 03-05-2010, 10:54 AM
  4. Linux Kernel Ups Graphics, Drops Android
    By Bimmerjo in forum Android General Discussions
    Replies: 5
    Last Post: 03-03-2010, 01:36 PM
  5. Replies: 17
    Last Post: 02-15-2010, 10:08 AM

Search tags for this page

200 lines patch
,
4 lines code cgroup
,

android cgroup

,

android cpu booster linux command lines

,

android linux commands

,

boost linux experience

,

cgroup android

,
cgroup android kernel
,
cgroup improves responsiveness under system strain java
,
cgroups android
,
kernel cgroups android
,
lines of linux android code
Click on a term to search our site for related topics.
Find us on Google+