Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1689001
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 00/37] fine-grained locking in binder driver |
| Date | 2017-07-17 14:50 +0200 |
| Message-ID | <u4dDk-54Q-15@gated-at.bofh.it> (permalink) |
| References | <tXMZb-354-3@gated-at.bofh.it> <tXXhT-1Ih-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jun 30, 2017 at 08:04:21AM +0200, Greg KH wrote: > On Thu, Jun 29, 2017 at 12:01:34PM -0700, Todd Kjos wrote: > > The binder driver uses a global mutex to serialize access to state in a > > multi-threaded environment. This global lock has been increasingly > > problematic as Android devices have scaled to more cores. The problem is > > not so much contention for the global lock which still remains relatively > > low, but the priority inversion which occurs regularly when a lower > > priority thread is preempted while holding the lock and a higher priority > > thread becomes blocked on it. These cases can be especially painful if the > > lower priority thread runs in the background on a slow core at a low > > frequency. This often manifests as missed frames or other glitches. > > > > For several years, a hacky solution has been used in many Android devices > > which disables preemption for most of the time the global mutex is held. > > This dramatically decreased the cases of glitches induced by priority > > inversion and increased the average throughput for binder transactions. > > > > Moving to fine-grained locking in this patchset results is a cleaner > > and more scalable solution than the preempt disable hack. Priority > > inversion is decreased significantly. > > Yeah, it is great to see this work done! I'll review these on Monday, > sorry, am traveling at the moment... All now queued up in my trees. thanks, greg k-h
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 00/37] fine-grained locking in binder driver Greg KH <gregkh@linuxfoundation.org> - 2017-07-17 14:50 +0200
csiph-web