← Back to team overview

ubuntu-phone team mailing list archive

Re: Catching CPU run-aways on Touch

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/05/2013 12:28 AM, Steve Langasek wrote:
> I don't see any shortcuts around the fact that identifying runaway
> processes is going to require manually sifting through reports to
> identify possible problems.  I think we should have a very clear
> idea of how we expect to make use of any data we're gathering on
> this front, before spending engineering effort on trying to gather
> it.

Maybe, we could have an API which a process should periodically call
while performing a CPU-intensive operation. Something like:

/* do some very long computation on a set of images */
for (int i = 0; i < n_images; i++) {
    ubuntu_api_declare_busy();
    apply_effect(image[i]);
}

This would tell the system the the process is aware that it's going to
use a lot of CPU; it might be extended with a parameter to say _how
long_ it's going to be busy, either in seconds or -- better -- in
another unit of measure (giga-cycles?) which can be multiplied by a
device-specific factor to find out a rough time estimate.

Ciao,
  Alberto
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlIocLwACgkQVLQegMXeCFJT9wCfUoI9RAXPvYkq3Zgkvf4Cusqi
E1AAn12pWyZyUI6sbRPx3vKyNWH80yUK
=t6mv
-----END PGP SIGNATURE-----


References