Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-17 Thread Martijn Coenen
On Thu, Nov 16, 2017 at 4:10 PM, Peter Zijlstra wrote: > Well, I go by the one described in all the real-time computing texts; > also found on Wikipedia FWIW: > > https://en.wikipedia.org/wiki/Priority_inheritance Guess I was taking inheritance too literally :-) > >> This behavior is also rela

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 02:03:13PM +0100, Martijn Coenen wrote: > On Thu, Nov 16, 2017 at 12:27 PM, Peter Zijlstra wrote: > > But that's exactly what you get!? How would it ever get below > > min_node_prio? PI only ever (temporarily) raises prio, it never lowers > > it. > > Ah I guess we have di

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Martijn Coenen
On Thu, Nov 16, 2017 at 12:27 PM, Peter Zijlstra wrote: >> On Wed, Nov 15, 2017 at 2:01 PM, Peter Zijlstra wrote: >> >> + * 1) binder supports a "minimum node priority", meaning that all >> >> transactions >> >> + *into a node must run at this priority at a minimum. This means >> >> that th

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Peter Zijlstra
On Thu, Nov 16, 2017 at 10:18:00AM +0100, Martijn Coenen wrote: > Thanks Peter for looking at this, more inline. So I think I'm having a very hard time understanding things because I've no idea how android works. I've made a number of assumptions below; please bear with me. > On Wed, Nov 15, 2017

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-16 Thread Martijn Coenen
Thanks Peter for looking at this, more inline. On Wed, Nov 15, 2017 at 2:01 PM, Peter Zijlstra wrote: >> + * 1) binder supports a "minimum node priority", meaning that all >> transactions >> + *into a node must run at this priority at a minimum. This means that >> the >> + *desired prio

Re: [PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-11-15 Thread Peter Zijlstra
On Thu, Oct 26, 2017 at 04:07:45PM +0200, Martijn Coenen wrote: > +/** > + * binder_set_priority() - sets the scheduler priority of a task > + * @task:task to set priority on > + * @desired: desired priority to run at > + * > + * The scheduler policy of tasks is changed explicitly, because we w

[PATCH v3 1/6] ANDROID: binder: add support for RT prio inheritance.

2017-10-26 Thread Martijn Coenen
Adds support for SCHED_BATCH/SCHED_FIFO/SCHED_RR priority inheritance to the binder driver. The desired behavior is as follows: Each thread in the binder threadpool runs at a default priority, which is typically nice 0. Binder nodes (endpoints that can receive binder transactions) can have a mini