Re: [PATCH 13/21] binder: relocate low space calculation

From: Carlos Llamas
Date: Fri Dec 01 2023 - 02:12:25 EST


On Tue, Nov 07, 2023 at 09:08:26AM +0000, Alice Ryhl wrote:
> Carlos Llamas <cmllamas@xxxxxxxxxx> writes:
> > Move the low async space calculation to debug_low_async_space_locked().
> > This logic not only fits better here but also offloads some of the many
> > tasks currently done in binder_alloc_new_buf_locked().
> >
> > No functional change in this patch.
> >
> > Signed-off-by: Carlos Llamas <cmllamas@xxxxxxxxxx>
>
> One suggestion below, but I'm fine either way.
>
> Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
>
>
> Carlos Llamas <cmllamas@xxxxxxxxxx> writes:
> > + if (debug_low_async_space_locked(alloc))
> > + buffer->oneway_spam_suspect = true;
>
> You could avoid a branch here like this:
>

Sure, sounds good to me.

--
Carlos Llamas