Re: [PATCH v2 17/28] binder: malloc new_buffer outside of locks

From: Alice Ryhl
Date: Mon Dec 04 2023 - 06:57:24 EST


> Preallocate new_buffer before acquiring the alloc->mutex and hand it
> down to binder_alloc_new_buf_locked(). The new buffer will be used in
> the vast majority of requests (measured at 98.2% in field data). The
> buffer is discarded otherwise. This change is required in preparation
> for transitioning alloc->mutex into a spinlock in subsequent commits.
>
> Signed-off-by: Carlos Llamas <cmllamas@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>