Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-16 Thread Todd Kjos
Thanks Peter. We'll give that patch a try as part of our refactoring. Looking at finer-grained locking and we'll try going back to rt_mutex plus this patch. On Wed, Sep 14, 2016 at 9:55 AM, Peter Zijlstra wrote: > On Wed, Sep 14, 2016 at 06:13:40PM +0200, Peter Zijlstra wrote: >> On Wed, Sep 14,

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Wed, Sep 14, 2016 at 06:13:40PM +0200, Peter Zijlstra wrote: > On Wed, Sep 14, 2016 at 06:11:03PM +0200, Peter Zijlstra wrote: > > On Tue, Sep 13, 2016 at 12:53:27PM -0700, Arve Hjønnevåg wrote: > > > On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra > > > wrote: > > > > cgroups should be irrel

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Wed, Sep 14, 2016 at 06:11:03PM +0200, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 12:53:27PM -0700, Arve Hjønnevåg wrote: > > On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra > > wrote: > > > cgroups should be irrelevant, PI is unaware of them. > > > > I don't think cgroups are irrelevan

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Tue, Sep 13, 2016 at 12:53:27PM -0700, Arve Hjønnevåg wrote: > On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra wrote: > > cgroups should be irrelevant, PI is unaware of them. > > I don't think cgroups are irrelevant. PI being unaware of them > explains the problem I described. If the task tha

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Wed, Sep 14, 2016 at 09:10:01AM +0200, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 12:53:27PM -0700, Arve Hjønnevåg wrote: > > Most of the tasks here are not RR/FIFO/DL tasks. I don't see anything > > in the rtmutex code or documentation that indicates that they don't > > work for normal ta

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Wed, Sep 14, 2016 at 09:10:01AM +0200, Peter Zijlstra wrote: > We could define a meaningful something for CFS and implement that, but > it isn't currently done. So the generalization of the Priority Inheritance Protocol is Proxy Execution Protocol, which basically lets the boosted task run _as_

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-14 Thread Peter Zijlstra
On Tue, Sep 13, 2016 at 12:53:27PM -0700, Arve Hjønnevåg wrote: > On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra wrote: > > On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: > > > >> A previous attempt to fix this problem, changed the lock to use > >> rt_mutex instead of mutex, but

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-13 Thread Arve Hjønnevåg
On Tue, Sep 13, 2016 at 12:32 AM, Peter Zijlstra wrote: > On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: > >> A previous attempt to fix this problem, changed the lock to use >> rt_mutex instead of mutex, but this apparently did not work as well as >> this patch. I believe the adde

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-13 Thread Arve Hjønnevåg
On Mon, Sep 12, 2016 at 11:42 PM, Greg Kroah-Hartman wrote: > On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: >> On Sat, Sep 10, 2016 at 10:28 AM, Greg Kroah-Hartman >> wrote: >> > On Sat, Sep 10, 2016 at 06:37:29PM +0200, Thomas Gleixner wrote: >> >> On Sat, 10 Sep 2016, Peter Zi

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-13 Thread Peter Zijlstra
On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: > A previous attempt to fix this problem, changed the lock to use > rt_mutex instead of mutex, but this apparently did not work as well as > this patch. I believe the added overhead was noticeable, and it did > not work when the preem

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-12 Thread Greg Kroah-Hartman
On Mon, Sep 12, 2016 at 08:44:09PM -0700, Arve Hjønnevåg wrote: > On Sat, Sep 10, 2016 at 10:28 AM, Greg Kroah-Hartman > wrote: > > On Sat, Sep 10, 2016 at 06:37:29PM +0200, Thomas Gleixner wrote: > >> On Sat, 10 Sep 2016, Peter Zijlstra wrote: > >> > >> > On Sat, Sep 10, 2016 at 09:16:59AM -0700,

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-12 Thread Arve Hjønnevåg
On Sat, Sep 10, 2016 at 10:28 AM, Greg Kroah-Hartman wrote: > On Sat, Sep 10, 2016 at 06:37:29PM +0200, Thomas Gleixner wrote: >> On Sat, 10 Sep 2016, Peter Zijlstra wrote: >> >> > On Sat, Sep 10, 2016 at 09:16:59AM -0700, Christoph Hellwig wrote: >> > > On Thu, Sep 08, 2016 at 09:12:50AM -0700, T

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-12 Thread Todd Kjos
Thanks for the reviews. We'll come up with a different solution. On Sat, Sep 10, 2016 at 10:28 AM, Greg Kroah-Hartman wrote: > On Sat, Sep 10, 2016 at 06:37:29PM +0200, Thomas Gleixner wrote: >> On Sat, 10 Sep 2016, Peter Zijlstra wrote: >> >> > On Sat, Sep 10, 2016 at 09:16:59AM -0700, Christoph

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Greg Kroah-Hartman
On Sat, Sep 10, 2016 at 06:37:29PM +0200, Thomas Gleixner wrote: > On Sat, 10 Sep 2016, Peter Zijlstra wrote: > > > On Sat, Sep 10, 2016 at 09:16:59AM -0700, Christoph Hellwig wrote: > > > On Thu, Sep 08, 2016 at 09:12:50AM -0700, Todd Kjos wrote: > > > > In Android systems, the display pipeline r

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Peter Zijlstra
On Sat, Sep 10, 2016 at 09:16:59AM -0700, Christoph Hellwig wrote: > On Thu, Sep 08, 2016 at 09:12:50AM -0700, Todd Kjos wrote: > > In Android systems, the display pipeline relies on low > > latency binder transactions and is therefore sensitive to > > delays caused by contention for the global bin

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Christoph Hellwig
On Thu, Sep 08, 2016 at 09:12:50AM -0700, Todd Kjos wrote: > In Android systems, the display pipeline relies on low > latency binder transactions and is therefore sensitive to > delays caused by contention for the global binder lock. > Jank is siginificantly reduced by disabling preemption > while

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Thomas Gleixner
On Sat, 10 Sep 2016, Peter Zijlstra wrote: > On Sat, Sep 10, 2016 at 09:16:59AM -0700, Christoph Hellwig wrote: > > On Thu, Sep 08, 2016 at 09:12:50AM -0700, Todd Kjos wrote: > > > In Android systems, the display pipeline relies on low > > > latency binder transactions and is therefore sensitive t

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Greg KH
On Sat, Sep 10, 2016 at 01:18:47PM +0200, Greg KH wrote: > On Fri, Sep 09, 2016 at 10:39:32AM -0700, Todd Kjos wrote: > > On Fri, Sep 9, 2016 at 8:44 AM, Greg KH wrote: > > > On Fri, Sep 09, 2016 at 08:17:44AM -0700, Todd Kjos wrote: > > >> From: Todd Kjos > > >> > > >> In Android systems, the di

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-10 Thread Greg KH
On Fri, Sep 09, 2016 at 10:39:32AM -0700, Todd Kjos wrote: > On Fri, Sep 9, 2016 at 8:44 AM, Greg KH wrote: > > On Fri, Sep 09, 2016 at 08:17:44AM -0700, Todd Kjos wrote: > >> From: Todd Kjos > >> > >> In Android systems, the display pipeline relies on low > >> latency binder transactions and is

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-09 Thread Todd Kjos
On Fri, Sep 9, 2016 at 8:44 AM, Greg KH wrote: > On Fri, Sep 09, 2016 at 08:17:44AM -0700, Todd Kjos wrote: >> From: Todd Kjos >> >> In Android systems, the display pipeline relies on low >> latency binder transactions and is therefore sensitive to >> delays caused by contention for the global bi

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-09 Thread kbuild test robot
Hi Todd, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.8-rc5 next-20160909] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience)

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-09 Thread Greg KH
On Fri, Sep 09, 2016 at 08:17:44AM -0700, Todd Kjos wrote: > From: Todd Kjos > > In Android systems, the display pipeline relies on low > latency binder transactions and is therefore sensitive to > delays caused by contention for the global binder lock. > Jank is significantly reduced by disablin

[PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-09 Thread Todd Kjos
From: Todd Kjos In Android systems, the display pipeline relies on low latency binder transactions and is therefore sensitive to delays caused by contention for the global binder lock. Jank is significantly reduced by disabling preemption while the global binder lock is held. This patch was orig

Re: [PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-08 Thread Greg Kroah-Hartman
On Thu, Sep 08, 2016 at 09:12:50AM -0700, Todd Kjos wrote: > In Android systems, the display pipeline relies on low > latency binder transactions and is therefore sensitive to > delays caused by contention for the global binder lock. > Jank is siginificantly reduced by disabling preemption > while

[PATCH] android: binder: Disable preemption while holding the global binder lock

2016-09-08 Thread Todd Kjos
In Android systems, the display pipeline relies on low latency binder transactions and is therefore sensitive to delays caused by contention for the global binder lock. Jank is siginificantly reduced by disabling preemption while the global binder lock is held. Originally-from: Riley Andrews Sign