Menu

#2 Subprocesses support

open
nobody
None
5
2008-02-16
2008-02-08
No

cpulimit doesn't limit the cpu usage of the
subprocesses (but the threads here works ok)

I'm attaching a patch that implements that, and
also implements the multiple processes of feature
request 1875300 (mostly as side-effect)

NOTE: The patch of the Makefile is because of function
memrchr, that depends on -D_GNU_SOURCE

Felipe3

Discussion

  • Felipe Abella

    Felipe Abella - 2008-02-08

    cpulimit.c patch

     
  • Felipe Abella

    Felipe Abella - 2008-02-08

    Makefile patch

     
  • Felipe Abella

    Felipe Abella - 2008-02-08

    Logged In: YES
    user_id=1565621
    Originator: YES

    File Added: Makefile.patch

     
  • Felipe Abella

    Felipe Abella - 2008-02-16
    • status: open --> closed
     
  • Angelo Marletta

    Angelo Marletta - 2008-02-16
    • status: closed --> open
     
  • Angelo Marletta

    Angelo Marletta - 2008-02-16

    Logged In: YES
    user_id=1183789
    Originator: NO

    Now subprocesses are limited too. Check out the code from svn.
    Your children detection algorithm is simple but heavy when there are a lot of children, because for each scanned process it checks if it is child of each member of the "family". So I've done an implementation using an hashtable for processes (like in the kernel), so I know in O(1) if a process is member of the family or not.
    Thanks for the note ;)
    Angelo

     

Log in to post a comment.

MongoDB Logo MongoDB