News: 0001515081

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Performance Improvements To Google's Binder Queued Ahead Of Linux 6.14

([Google] 111 Minutes Ago Faster Page Installation)


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 [1]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 [2]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.



[1] https://lore.kernel.org/all/20241210143114.661252-1-cmllamas@google.com/

[2] https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/log/?h=char-misc-next



phoronix

Well, anyway, I was reading this James Bond book, and right away I realized
that like most books, it had too many words. The plot was the same one that
all James Bond books have: An evil person tries to blow up the world, but
James Bond kills him and his henchmen and makes love to several attractive
women. There, that's it: 24 words. But the guy who wrote the book took
*thousands* of words to say it.
Or consider "The Brothers Karamazov", by the famous Russian alcoholic
Fyodor Dostoyevsky. It's about these two brothers who kill their father.
Or maybe only one of them kills the father. It's impossible to tell because
what they mostly do is talk for nearly a thousand pages. If all Russians talk
as much as the Karamazovs did, I don't see how they found time to become a
major world power.
I'm told that Dostoyevsky wrote "The Brothers Karamazov" to raise
the question of whether there is a God. So why didn't he just come right
out and say: "Is there a God? It sure beats the heck out of me."
Other famous works could easily have been summarized in a few words:

* "Moby Dick" -- Don't mess around with large whales because they symbolize
nature and will kill you.
* "A Tale of Two Cities" -- French people are crazy.
-- Dave Barry