Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp846619rdb; Thu, 30 Nov 2023 23:12:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFidiuia/ziR1ZQJeeUartV7bj9mW20ZT9pCPo+Rvt4EN0eHrbw+OfSM7ZENlhtRC7bfNpR X-Received: by 2002:a05:6358:8822:b0:168:e614:ace9 with SMTP id hv34-20020a056358882200b00168e614ace9mr24225150rwb.11.1701414751585; Thu, 30 Nov 2023 23:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701414751; cv=none; d=google.com; s=arc-20160816; b=WWEAcp3h8V9tkIk9iGWmzmQJDkWkZwCz3hBEcWWlcghQ3CxGIWkv5lZNNNycSXPWdl zQGLCihvnkFZrL2cLtIS4LCSHfMm6pzbZNb82WqnHzX9xS4EIlTPfFEjyoKcEo9OjtCc +UgowAhfEWUy6rOpdf5AfAh6quMgjiEI7LQtprEBL2KNZPWmIEJYihEh7b2W7cYoYVzo a6fZBc6uZ/lT6ygTKjgtygJ5bZg8IbFT7A43bRHy5C73uUaVdkvFeRXWQkCdFnxHbQec gsiTBYE7e31wciEK0ismJOniM5Rqu2ocMf7fhsNGaO44OLM+/yhCTQuuk7hpqlYAv6dD bt1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GRj7rwJmjk4sqfGJObODWeeU/ipL8kGI/CkkCS5s80k=; fh=658IzL/FnSGry58xenYrijK6lVYrX2ZKm8jUOjcb14s=; b=VWb8219GmU0t6ctWKEh6Ep8Sl/Z7vAe+2DCvxisgEt0ltqukOaQP88vVXYR58Hwt49 glQPybJF6g2XauHz3P2DhN3noSlO2W/zmAF5R2zrGEZ55npakiIQDqjKSPTLCwUuH/DZ 9vIwQr23aOGcA6BqdBRYiirEbXfMIXLzCce3Or318V5lHXB2L8XcDh/9AjE0dFlrIkpm 1R6BzYwALBP3CwEayjG21xW5WMAFpc22neeLczCJKoHNumwDHl3YrMFNLzdoH8zkrb73 f564o8ApggSXLmrLMi0I5V+LlTj+WEideUv3TzLogTDOunaHotXahMf43q1gRSS/tKeW OJKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YUw+3lDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bw18-20020a056a00409200b006cbe638cd99si2862880pfb.368.2023.11.30.23.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=YUw+3lDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 39483801B802; Thu, 30 Nov 2023 23:12:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbjLAHMP (ORCPT + 99 others); Fri, 1 Dec 2023 02:12:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjLAHMN (ORCPT ); Fri, 1 Dec 2023 02:12:13 -0500 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 406DBB6 for ; Thu, 30 Nov 2023 23:12:20 -0800 (PST) Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3b83c4c5aefso126262b6e.1 for ; Thu, 30 Nov 2023 23:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701414739; x=1702019539; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GRj7rwJmjk4sqfGJObODWeeU/ipL8kGI/CkkCS5s80k=; b=YUw+3lDkapv+rqlKwig8FmO1OQPfmpGOq3/Ma4/ZRKdSGUfO0znJoj1/U3kxcdKjyN bbuNG540rrPyBrJVe0v3P9ZIVl7MJE793FQCcE1P+pM03MKrAv5QTv+/aQAXqbv2OsjY uLiDtewlSF3AZ3b6fcuYclEdOc/KYuioIPRY5d4mndH84b/rT28A1Ac6oAQioq4ZW/HZ vCXHMyHFxRtU8Ww7urJWzlfgN91h4iXNo6kp7OKeXP473M53ST76JAa5jsy+NRWaWcqr hszEY6W7t+QDGO4xgF7E7yo4yHdZG0c787P4tKe97MJ2CF05uVgUA8oAUS718nSBANCm LvYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701414739; x=1702019539; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GRj7rwJmjk4sqfGJObODWeeU/ipL8kGI/CkkCS5s80k=; b=Pxc1d9QPbEYCRsOhfy1Z1JSORlFuDfFmajyTAQ+eAcsXwlxcw5mweYMEyQfer8h3Vx HsQKwU1isd74hIiNXax0aJ99jgWL92Ic/cdYgDSszk6qkXHxSwHEG86OoLkeVP+Folds gw+E+YS6FL3Sho/76g596UFe5LDjWtnsd+sEK+j8ugrrOy6S+Dtlia7PVY0WU0Vpv8IP M4Lr2k1Gv7/rVmcJ719m9FGWAC4UmS9BdyDNT7iDrLc/HG/Eeynw7YA1F+dWXFcqBs+D MR0mAalFwvThYKoO0Fueqdmy9pxkPZilfGB0gMv3JJDh0PsXKKsH4LfZGOLaK4+51BLv +ePw== X-Gm-Message-State: AOJu0YysMOEEbPyE/HeaFM/yi5zsqStocQwCP1ls+z5OYrNvKx7aEYzh ADWa6kvACLg0CGPQP3I6SWoSrQ== X-Received: by 2002:a05:6808:1242:b0:3ae:5c89:dcc2 with SMTP id o2-20020a056808124200b003ae5c89dcc2mr2117772oiv.34.1701414739396; Thu, 30 Nov 2023 23:12:19 -0800 (PST) Received: from google.com (170.102.105.34.bc.googleusercontent.com. [34.105.102.170]) by smtp.gmail.com with ESMTPSA id ff11-20020a056a002f4b00b006cb797722e6sm2326308pfb.109.2023.11.30.23.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 23:12:18 -0800 (PST) Date: Fri, 1 Dec 2023 07:12:15 +0000 From: Carlos Llamas To: Alice Ryhl Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Christian Brauner , Greg Kroah-Hartman , Joel Fernandes , kernel-team@android.com, linux-kernel@vger.kernel.org, Martijn Coenen , Suren Baghdasaryan , Todd Kjos Subject: Re: [PATCH 13/21] binder: relocate low space calculation Message-ID: References: <20231102185934.773885-14-cmllamas@google.com> <20231107090826.259454-1-aliceryhl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107090826.259454-1-aliceryhl@google.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 30 Nov 2023 23:12:28 -0800 (PST) On Tue, Nov 07, 2023 at 09:08:26AM +0000, Alice Ryhl wrote: > Carlos Llamas 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 > > One suggestion below, but I'm fine either way. > > Reviewed-by: Alice Ryhl > > > Carlos Llamas 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