From: Alice Ryhl <aliceryhl@google.com>
To: Rafael Passos <rafael@rcpassos.me>
Cc: rust-for-linux@vger.kernel.org, gregkh@linuxfoundation.org,
arve@android.com, tkjos@android.com,
Christian Brauner <brauner@kernel.org>,
cmllamas@google.com, Shuah Khan <skhan@linuxfoundation.org>,
Brigham Campbell <me@brighamcampbell.com>,
Jori Koolstra <jkoolstra@xs4all.nl>
Subject: Re: [PATCH v2] rust_binder: speed up get_node_debug_info using lower_bound iter
Date: Tue, 4 Aug 2026 13:14:27 +0000 [thread overview]
Message-ID: <anHls4pUymGcjZwo@google.com> (raw)
In-Reply-To: <20260731133253.661634-1-rafael@rcpassos.me>
On Fri, Jul 31, 2026 at 10:31:03AM -0300, Rafael Passos wrote:
> Finding the next node in the RBTree can be done more efficiently using
> the cursor_lower_bound, as it reduces cost from O(n) to O(log n).
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1249
> Suggested-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Rafael Passos <rafael@rcpassos.me>
This looks fine to me.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> It took me a while to get the AOSP + Cuttlefish setup running, and
> using the rust binder module. I got it working, and ran:
> libhwbinder_benchmark libbinder_benchmark, hwbinderThroughputTest
> libhwbinder_latency and binderThroughputTest benches.
> But apparently none of them used the function I touched (I added log).
> Also, the "hw" variants like hwbinderThroughputTest kept logging a
> "worker_fx:217 condition:service->isRemote() failed" message.
> I decided to send the v2 anyway.
>
> I am thinking about writing a benchmark focused on node scaling
> (test N iterations with X nodes), and run with small and larger Xs.)
> Would such a benchmark be welcome here in upstream mainline ?
> It would be in either C or Rust (the AOSP ones are in C++).
> Would it live under `tools/perf` ?
>
> I looked at the kunit tests (`drivers/android/tests`) and they dont
> cover the rust binder either. That's another thing I could try to add.
In Android this is used by libmemunreachable when checking whether a
process has a memory leak. The perf matters because if the number of
nodes is very large, invoking the ioctl repeatedly many times could take
a seriously large amount of time. Seconds or even more.
Alice
prev parent reply other threads:[~2026-08-04 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 13:31 [PATCH v2] rust_binder: speed up get_node_debug_info using lower_bound iter Rafael Passos
2026-08-04 13:14 ` Alice Ryhl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anHls4pUymGcjZwo@google.com \
--to=aliceryhl@google.com \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jkoolstra@xs4all.nl \
--cc=me@brighamcampbell.com \
--cc=rafael@rcpassos.me \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tkjos@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox