Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6593484pxv; Thu, 29 Jul 2021 19:40:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvJ6xg5hoqj+m5yCadnxe7IX1k9J7C0Rc8rHLgDGjzLinvl1jrQAC307wCbu7vjh+kjVbT X-Received: by 2002:a05:6402:619:: with SMTP id n25mr242512edv.243.1627612835691; Thu, 29 Jul 2021 19:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627612835; cv=none; d=google.com; s=arc-20160816; b=UQceypoN7nW3MhePi6yKaWQT8Zt5iaUW3w0ZhIa/nHfMqDWJmtIbp7t5uiw1DcLvUH veYBagxY6X5lYoqMtxmMItLaxyL188CSH3lk8HVhB/Lco7Ix1HkCps9x7NTDtGsmXnKe I5/16el18z/JN09khOTNf6Ye1Zi7qVQyH10FZ462HCRWIjcgb+Ay/TuEcm8mxfa3zPkl gSbC2YqP3pmTR/VM4ybczoZt5p6x2L03fHlOkYo6Pqk4VhOTtzjOk3JUxxDV/0FH2BtK QY3mfv8VFrnGi4MfxOA2fIv7SwcUGSkVQzm9x25odqPfpsfNDp4DQ0TMDf0eUBcLjYba AxDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=x4WMMn3KZL/hzwCkedZqe/lll/VsdM4TyQkWpwv+pB0=; b=Zsfswt+DD1Vidoa/vdyuha6PlzY36YY/Kgqi/hQIzXXYMsCJMPT1gJgMD3jYW72dlc jI4em4cghyJi2sSPbvAY5zkWs4efHtfnWk8MtgB36nWKzeQckIZtION+bYbD0MCHQ1s9 6fT7txxVi+wJVG4Bb/mtWpFTap4L0MMC4v75aBRmh8lWvqnUViiMtmCz5PMoxGoeGgLm qS+Ars223DhxQO7D9jyv2l3n9WPsiyIlreOUlyTFWRu9Bgh+3/WdIExMUbZLiVCvyfbq tvinUmx0OmH/qgzwXLIRn1TQnoAU9Qu1kGuYiWC99kF3rjo22E2sF2CSNcTvx5G/0MIt isfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=Ekx4RmWX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si301093edd.40.2021.07.29.19.40.12; Thu, 29 Jul 2021 19:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=Ekx4RmWX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbhG3Cil (ORCPT + 99 others); Thu, 29 Jul 2021 22:38:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbhG3Cik (ORCPT ); Thu, 29 Jul 2021 22:38:40 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8BC4C061765 for ; Thu, 29 Jul 2021 19:38:35 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id n10so9300208plf.4 for ; Thu, 29 Jul 2021 19:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x4WMMn3KZL/hzwCkedZqe/lll/VsdM4TyQkWpwv+pB0=; b=Ekx4RmWXZPFJE+OMq795Ky7l5Qiiu10/BdprEfuK7DG+c7bB5LrAOoxCfOq4LcZdVB yBREPZM20pqfvFU85pDqfCUKfxMy2RQvQJA1Oo9WdmQS1E3QhJLqVvKHd2W1lsTmaYFV IubFHVyVEUe+rkf/seQ+ZGzYLjQhZ8PdSvS2mB6lwN3aTJMTGelWDOqxJilxvC10Hyl3 1pmNQgU/21cplXyhA7jnHCWRUeOai5mmHHhP6If+azneudn4hpuE3f5ZfN0ULd+XhatO PeLdmEC8sMTSch8HjtrbtNCKYJuDQ+p5Qhiwxn3ofBQmXx4KzMLaoFZSAZoDFOMBH4jD y7Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x4WMMn3KZL/hzwCkedZqe/lll/VsdM4TyQkWpwv+pB0=; b=Fm4dulyOgshDyDeWLrN6hwbXuoDwanD1I4euf09XLwLxcOFXrRiZWZMO6BARrqiITG jkcYQrDnnHenG84ahPBkGLIyP0OVUhkWsK/uQj27pqqYvKhk7pqBskXpnaj+5SIMyzN6 gFeLkgWoH1FgeqebCkh2H1iXl+tXx1MWrc4drhedWn0Bb5H90V/pPfS+TbwXcvIfMzSP gNxnEsdKYHQ5Q9xJeuxfRFFklZX094VXbeBc8rNr8Q6S8Vzb/Ri0phFSIDeeANpwRSaa nooqLSw256QPQwVHTsY3U1l80wAWV1S1WXZejNu0lXPL4Ruh5P92I0GU05l7R/svm1JZ L6Qg== X-Gm-Message-State: AOAM532W1VVNDbWfPmfwIvd/1mz1Y5ch5h602oBuRFaayAauUZiGHGR4 xmM6TrsBjre61YUgPeKkSDaJy5s9yHem/vNW+qiTOQ== X-Received: by 2002:a63:550c:: with SMTP id j12mr203751pgb.31.1627612715592; Thu, 29 Jul 2021 19:38:35 -0700 (PDT) MIME-Version: 1.0 References: <20210729125755.16871-1-linmiaohe@huawei.com> <20210729125755.16871-4-linmiaohe@huawei.com> In-Reply-To: <20210729125755.16871-4-linmiaohe@huawei.com> From: Muchun Song Date: Fri, 30 Jul 2021 10:37:55 +0800 Message-ID: Subject: Re: [PATCH 3/5] mm, memcg: save some atomic ops when flush is already true To: Miaohe Lin Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Shakeel Butt , Roman Gushchin , Matthew Wilcox , Alex Shi , Wei Yang , Linux Memory Management List , LKML , Cgroups Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 8:57 PM Miaohe Lin wrote: > > Add 'else' to save some atomic ops in obj_stock_flush_required() when > flush is already true. No functional change intended here. > > Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song