A patch-set working on faster page installations for Google’s Binder that is used by Android is on the way for Linux 6.14.
Binder continues to be vital to Android for Inter-Process Communication (IPC) and with the forthcoming upstream Linux kernel code will be able to benefit from faster page installation.
Google engineer Carlos Llamas has been working on this set of nine performance optimization patches and explained in the v7 series earlier this month:
“The main focus of these patches is to improve the performance of binder page installations, primarily by reducing contention on the mmap_lock. The idea is to allow concurrent page insertion by leveraging per-vma locking and get_user_pages_remote().
Unfortunately, this required reverting the alloc->lock spinlock back into a mutex in order to serialize with the shrinker. At least until finding a better solution e.g. support page zapping with a spinlock. The trade off is still quite worth it though.
Other patches are also included that remove unsafe and redundant things such as the alloc->vma pointer or the struct binder_lru_page concept.
Note: I’ll work on setting up a page fault handler for binder next. I believe an idea from Alice Ryhl to deferred the page insertions will make this finally feasible. I only need to figure out a few performance bits but if/when done most of the manual page insertion code in binder could be dropped. :)”
As of this week those Binder patches have been queued up into char-misc.git’s char-misc-next maintained by Greg Kroah-Hartman. With the patches now in char-misc-next, they are destined for introduction in the Linux 6.14 kernel barring any last minute issues or concerns raised by Linus Torvalds.
The Linux 6.14 merge window is set to open up in the latter part of January following the Linux 6.13 stable debut.