FedoraForum.org - Fedora Support Forums and Community
Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy alternative to the new 200 line kernel patch

    A couple lines of code could potentially do the same thing as the new 200 line patch.This was developed by Redhat developer Lennart Poettering.

    Here is the article: http://www.webupd8.org/2010/11/alter...nel-patch.html


    Apparently it results in even better performance then the 200 line kernel patch.


    If anyone finds out how to do this in fedora could you please post how.

  2. #2
    Join Date
    May 2009
    Location
    Manorville, New York, USA
    Posts
    1,677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    I think the link you gave is a how-to.
    Registered Linux User #348347
    Have you been seduced by siduction? http://siduction.org/index.php
    Running Fedora 19/20, siduction and openSUSE 13.1 with KDE

  3. #3
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by GoinEasy9
    I think the link you gave is a how-to.
    This is what I get when I follow the first instructions (not the Ubuntu instructions below):

    Code:
    mkdir: cannot create directory `/sys/fs/cgroup/cpu/user/2839': No such file or directory
    bash: /sys/fs/cgroup/cpu/user/2839/tasks: No such file or directory
    I tried a couple more times with the Ubuntu instructions and had the same result.
    Last edited by simpleblue; 19th November 2010 at 06:42 AM.

  4. #4
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    10,390
    Mentioned
    134 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Those instructions don't work in Fedora 13, which uses /cgroup instead of /sys/fs/cgroup. To make it work in F13 (and probably in F14) do this:

    1. As root, run /usr/sbin/system-config-services and enable the cgconfig service, then start the service.
      (That service should already be installed, as part of the libcgroup package. If not, install it : yum install libcgroup)
    2. Run the following command, and also add it to the /etc/rc.d/rc.local file:
      Code:
      mkdir -m 0777 /cgroup/cpu/user
    3. Add these lines to your ~/.bashrc file:
      Code:
      if [ "$PS1" ] ; then
         mkdir -m 0700 /cgroup/cpu/user/$$
         echo $$ > /cgroup/cpu/user/$$/tasks
      fi

    You should be good to go now. Because the cgconfig service was started in step 1, there's no need to reboot. You just need to start a new shell to start seeing the effects. Of course, on reboots all of this will happen automatically if you added the command in step 2 to /etc/rc.d/rc.local. It's working fine for me in F13.

  5. #5
    Join Date
    May 2005
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Hi

    Does one need to do any clean up?

    The task folder in /cgroup/cpu/user/ seem to stay after he shell has been closed.

    Regards
    Daniel

  6. #6
    Join Date
    Oct 2009
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    I`m wondering what these entries in .bashrc mean? And if it works why hasn`t it been used before? It looks that linux kernel got big and complicated and nobody understands it as a whole if someone tries to patch a kernel against something solvable with bash setup.

  7. #7
    Join Date
    Aug 2007
    Location
    Cornwall England
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by RupertPupkin
    It's working fine for me in F13.
    It might be a bit early to ask but do you notice any significant differences with the change ?

  8. #8
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Thank you for the help Rupert!

    I installed system-config-services (already enabled) and libcgroup.

    Quote Originally Posted by RupertPupkin
    [*]Run the following command, and also add it to the /etc/rc.d/rc.local file:
    Code:
    mkdir -m 0777 /cgroup/cpu/user
    [root@localhost user]# mkdir -m 0777 /cgroup/cpu/user
    mkdir: cannot create directory `/cgroup/cpu/user': No such file or directory
    When I ran this command it displayed this:

    Code:
    [root@localhost user]# mkdir -m 0777 /cgroup/cpu/user
    mkdir: cannot create directory `/cgroup/cpu/user': No such file or directory

  9. #9
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Try,
    Code:
    mkdir -p -m 0777 /cgroup/cpu/user

  10. #10
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by PabloTwo
    Try,
    Code:
    mkdir -p -m 0777 /cgroup/cpu/user
    It still says the same thing:

    Code:
    [user@localhost ~]$ mkdir -p -m 0777 /cgroup/cpu/user
    mkdir: cannot create directory `/cgroup/cpu': Permission denied

  11. #11
    Join Date
    Jul 2007
    Location
    ::1
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    if you have
    Code:
    mkdir -p -m 0777 /cgroup/cpu/user
    in rc.local, than
    Code:
    sudo sh /etc/rc.local
    should do the trick without reboot.

  12. #12
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by simpleblue
    It still says the same thing:

    Code:
    [user@localhost ~]$ mkdir -p -m 0777 /cgroup/cpu/user
    mkdir: cannot create directory `/cgroup/cpu': Permission denied
    No, it doesn't say the same thing. When you first ran the command without the -p option you were root, which is what you need to be when running that command. When you ran it again with the -p option, you were not root, and you got the "permission denied" error, which you didn't get the first time around.

  13. #13
    Join Date
    Aug 2007
    Location
    Cornwall England
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy alternative to the new 200 line kernel patch

    RupertPupkin and Schurke's modification are in place here i think. Thanks guys.
    No obvious changes noticable, might be slightly faster but that could easily be wishful thinking.
    Of course i did backups of everything beforehand.

  14. #14
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by schurke
    if you have
    Code:
    mkdir -p -m 0777 /cgroup/cpu/user
    in rc.local, than
    Code:
    sudo sh /etc/rc.local
    should do the trick without reboot.
    When I entered this in again in root it ran without error. Thanks for mentioning that PabloTwo.

    I still have this coming up every time I run terminal (with reboot as well):

    Code:
    mkdir: cannot create directory `/sys/fs/cgroup/cpu/user/3168': No such file or directory
    bash: /sys/fs/cgroup/cpu/user/3168/tasks: No such file or directory
    Perhaps I've inputted a script or command that's causing it to return? It might even be working with the exception of the error above. Currently my ~/.bashrc file has this added:

    Code:
    if [ "$PS1" ] ; then
       mkdir -m 0700 /cgroup/cpu/user/$$
       echo $$ > /cgroup/cpu/user/$$/tasks
    fi

  15. #15
    Join Date
    Aug 2007
    Location
    Cornwall England
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy alternative to the new 200 line kernel patch

    @ simpleblue; Are you using Fedora, as RupertPupkin's suggestion is code for Fedora ?

    Also when you say :

    Quote Originally Posted by simpleblue
    I still have this coming up every time I run terminal (with reboot as well):

    Code:
    mkdir: cannot create directory `/sys/fs/cgroup/cpu/user/3168': No such file or directory
    bash: /sys/fs/cgroup/cpu/user/3168/tasks: No such file or directory
    Perhaps I've inputted a script or command that's causing it to return? It might even be working with the exception of the error above. Currently my ~/.bashrc file has this added:

    Code:
    if [ "$PS1" ] ; then
       mkdir -m 0700 /cgroup/cpu/user/$$
       echo $$ > /cgroup/cpu/user/$$/tasks
    fi
    is that without entering any mkdir command into the terminal ?

Page 1 of 3 123 LastLast

Similar Threads

  1. Need to Patch Kernel, but The Patch Requires Kernel Config.
    By AwesomeMachine in forum Using Fedora
    Replies: 4
    Last Post: 13th January 2010, 06:50 PM
  2. Need Help Making a Kernel Patch work with F11 Kernel
    By Jeff91 in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 12th June 2009, 12:51 AM
  3. Line-In Problem (Probably an Easy Solution?)
    By jobeirne in forum Using Fedora
    Replies: 7
    Last Post: 28th April 2006, 01:44 AM
  4. how to patch using command line
    By xyleo in forum Using Fedora
    Replies: 4
    Last Post: 4th April 2006, 06:51 AM
  5. how to patch a kernel
    By thesource in forum Using Fedora
    Replies: 1
    Last Post: 1st July 2005, 04:59 AM

Posting Permissions

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