OSDN Git Service

Increase priority of unresponsive threads.
authorAndy McFadden <fadden@android.com>
Fri, 7 Aug 2009 18:41:35 +0000 (11:41 -0700)
committerAndy McFadden <fadden@android.com>
Fri, 7 Aug 2009 22:28:17 +0000 (15:28 -0700)
commit7ce9bd763f29959ba3c448ba8584d6711c6a40bc
tree09c9fc9482bbab8234aa8741bd1c460aa11a72b8
parent4879df9b4e10b3a77d7ad7c945cae0b15b8e8b31
Increase priority of unresponsive threads.

The VM uses a safe-pointing thread suspension mechanism, which currently
means that the GC can't do its work until the various threads enter a
non-running state.  This can be a problem if a low-priority thread was
scheduled out and other processes in the system are running flat out.

This changes the "spin on suspend" mechanism to increase the priority of
unresponsive threads.  Currently we just boost the "nice" value, since
that seems to be enough to do the trick in my tests, but we may have to
shift the cgroup around as well (assuming other recent changes don't
simply render this unnecessary).
vm/Thread.c