← Back to team overview

ubuntu-phone team mailing list archive

Re: Find out if running on a phone

 


On 11.01.2016 05:31, Michi Henning wrote:
>> I wouldn't make the assumption that confined processes are necessarily
>> running in the phone as i believe the convergence plan is to have
>> confined apps on the desktop.
>>
> Right.
>>
>> Aside from that, i would just try to do whatever it is you're trying
>> to do and then catch the failure as gracefully as possible when it
>> fails on the phone, if you can. Better to ask forgiveness than
>> permission ;-)
>>
> No can do, I’m afraid. The decision as to how many concurrent
> extractions to allow fundamentally depends on knowing whether or not we
> are using the Android hardware codecs. There is no way to figure this
> out that I know of, other than to ask “am I running on touch?” because,
> by definition, we *know* (at least for the time being) that, on touch,
> we are using hardware codecs.

This assumption won't hold for long. It might work the few phone
devieces we are shipping now, but it's really the wrong thing to do.
Landing that will get you bug reports from people running touch on
non-android hardware in no time. Remember, there are people working on
building a personal desktop based on snappy, there are developers
running the whole "touch" (we should really stop using that term) thing
on x86 tablets and on Laptops.

You should contact the security team and find a way to be able to
determine what hardware codecs are available from the confined process.

> 
> I cannot catch the failure. For one, it is non-deterministic. Secondly,
> when the failure does happen, it manifests itself as several unkillable
> processes that are stuck in the kernel, each spinning at 100% CPU for 30
> seconds. That failure mode is not only rather hard to detect, it’s also
> not a good way to find out that I shouldn’t have done what I did…
> 
> Right now, we are working around the problem by disabling concurrent
> extraction whenever we are running on Arm. But that disables concurrency
> even when software codecs are in use, such as on a Chromebook. In turn,
> that means we are not using three perfectly good CPUs that we could use,
> if only we had an answer to the question :-(
> 
> Michi.

Attachment: signature.asc
Description: OpenPGP digital signature


References