lkml.org 
[lkml]   [2023]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 13/21] binder: relocate low space calculation
From
Carlos Llamas <cmllamas@google.com> 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@google.com>

One suggestion below, but I'm fine either way.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>


Carlos Llamas <cmllamas@google.com> writes:
> + if (debug_low_async_space_locked(alloc))
> + buffer->oneway_spam_suspect = true;

You could avoid a branch here like this:

buffer->oneway_spam_suspect = debug_low_async_space_locked(alloc);

Alice

\
 
 \ /
  Last update: 2023-11-20 13:51    [W:0.263 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site