OSDN Git Service

Improvements to cgroup stuff.
authorAndy McFadden <fadden@android.com>
Tue, 4 Aug 2009 22:02:12 +0000 (15:02 -0700)
committerAndy McFadden <fadden@android.com>
Tue, 4 Aug 2009 22:23:37 +0000 (15:23 -0700)
commitd62c0b5d6acaa37bcac36452e74b21782e104968
treef728b8ec80af2811ba5a545ed4235bd4b10085c5
parent46dd16c8bf4f0732fc76cb38b13412c042394473
Improvements to cgroup stuff.

When a thread is created or changes priority via Thread.setPriority(),
the cgroup value was being set incorrectly -- the code was comparing
the priority vs. the "nice" values we use in the rest of Android.
This was preventing threads from being moved into the background group
when first created.  (It's not clear whether this matters in most cases,
since the system appears to move threads in and out of the background
cgroup without regard to their "nice" value in Process.setProcessGroup.)

The code that changed the cgroup wasn't really checking the return
value, though this is only meaningful if the verbose error logging is
compiled in.

The above have been fixed, and in addition the thread dump now displays
the cgroup value next to the other priority information.
vm/Thread.c