Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4000174pxu; Mon, 12 Oct 2020 07:04:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfOjbfBNeKLnnXNhoSVsONojl+MsOslAv/0ft8weZe/aoj1reKITWuleEo2FAMLtrfTNR1 X-Received: by 2002:a50:9dc8:: with SMTP id l8mr14363824edk.58.1602511446107; Mon, 12 Oct 2020 07:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602511446; cv=none; d=google.com; s=arc-20160816; b=zciSbyzn1ggS33Maj0rqjGs7BhpLVtv7Xz2UAbzd5BfGUr3kqaQ6AoRf1Gxj08iQGD KhM07B/gTt6cgYtENeYGkAU+6frvj72aOnKPoCf71famhm8+cmVvmuYFvxP/3E2nja0I nuKpFHxOv3KZeBQ8fga0A05gRexo13OyjSm1o7IhEf3elfv8tes+4cDNDZgYM8K0TBzf Q0P9aJV8YGSXAnj+NnAqkTugqrNDoyxUWsyqIGs4G0TgH17rT+MbB/WthqCrVsRWdKkb 3RuE/k4J9JBj3rpCN9wGrp/h1LJEP4cSsqlaEqs0kzJDo1FqIaqeopHB77zWErKG5EVJ m8EA== 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=Osshed0yZw01kGf9tsxsPTMgiFVwAv+3bFml5Qp/S6I=; b=wSUxFPfHzElunZO1nY/2gxcWsacs/NVGvbF+SI/TupkKqH8FUFbRIhn4X3qAS/futJ lthEcpjM6an9X8+MOM7bMG5zw5RTyWXvOcZmViVMMEMlXZK9ytlQuf/M7pMqfYdiE3bL 9FMevYMJ2SuGT4wVzcu26prG/AAiKYJflT5gG1GlcoSlj9ynIm0U7WR3pkyvBDWob6Xv nw8PDzHSssz4+OQBQBjuFhgtcvm/RHwMMaywBIJIG2CqAw7RQdr1c2xRWWwj/OMhgFp/ 22ppze2M1RgqGQzUkNTspEaIEM+AyPPm99qzq07nkysq3KdqecmhTcTvVBjoBexXO0Ah SDFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="Sbr/oBRE"; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si11954379edf.523.2020.10.12.07.03.42; Mon, 12 Oct 2020 07:04:06 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="Sbr/oBRE"; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731429AbgJLOAg (ORCPT + 99 others); Mon, 12 Oct 2020 10:00:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388795AbgJLOA1 (ORCPT ); Mon, 12 Oct 2020 10:00:27 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFE4C0613D0 for ; Mon, 12 Oct 2020 07:00:27 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id k9so3533043qki.6 for ; Mon, 12 Oct 2020 07:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Osshed0yZw01kGf9tsxsPTMgiFVwAv+3bFml5Qp/S6I=; b=Sbr/oBREuW7qcPtzuexM9iqgk70TQmYyzQXuD1cbd5tg3SM9lOdsUrYHoMeDV8DQOy UueavBzl67FQvEbouK6Moe2nIYbhuX9Hn/9BejDvPgFbCGiyk2hgSOMhEkN1TeJv/qtG QzswFmgdtJF5bzku8cKITDYpnUD0wwK34cI58duEv3gteiqgDliboq3LM6ANyw7Hw7N8 mr2mtvc7dMULRnVyov6TZVXr7YambYnUtko20U4NfXMHS8v6ODN77S0030C9VFTxb3Jg SLdFjX8tM2pYjiRg+V0DWXvSupRdsxN3aGXSBj1Av+um8cbeKqZGirKH6agH6pmHvcXi rANQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Osshed0yZw01kGf9tsxsPTMgiFVwAv+3bFml5Qp/S6I=; b=nEmBYkAcBEPcn5RTwNqwJCEKV7bIjcJRA3U9e/niiBG2X7jfrTIn+pqtTyA7Qo+yRa YA/l8jM5T1IWdQ28w+zUx3JMuNYPEiPlwp4eUwxuSOZjUhD8S9z2gqQ9yZZiHPKMcr0I hIxWjblPVZwfQ5xiSUEexkekuEV/mL8cBGuIS3vmyd2RK99gBSfEexagkHhkm4lwmDIZ +GD6QX0UIcq5iFYUIWmEBYogH3KX0Qr/VWjXm6nP1Cq7x+xIfxhvDsKeoe2UVlRvuDgq zXU8hUcSte0YBABi8I3zQaQEGtupFb84DjKZ0D0J/a544zhZD4zKPSEAdpuZezdf8P/P Lilw== X-Gm-Message-State: AOAM531dSL1soPRCvWgALp2jk6KpoU4B5VP2RuxtbBh22zraozlI8Srg l6/iNXgr4ndf5617MLTtwlivrETHB4vnsA== X-Received: by 2002:a05:620a:c92:: with SMTP id q18mr9436584qki.295.1602511226559; Mon, 12 Oct 2020 07:00:26 -0700 (PDT) Received: from localhost (pool-96-232-200-60.nycmny.fios.verizon.net. [96.232.200.60]) by smtp.gmail.com with ESMTPSA id t65sm12299450qkc.52.2020.10.12.07.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 07:00:25 -0700 (PDT) Date: Mon, 12 Oct 2020 09:58:52 -0400 From: Johannes Weiner To: Miaohe Lin Cc: akpm@linux-foundation.org, mhocko@kernel.org, vdavydov.dev@gmail.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded() Message-ID: <20201012135852.GB188876@cmpxchg.org> References: <20201012131607.10656-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201012131607.10656-1-linmiaohe@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 09:16:07AM -0400, Miaohe Lin wrote: > The mz->usage_in_excess >= mz_node->usage_in_excess check is exactly the > else case of mz->usage_in_excess < mz_node->usage_in_excess. So we could > replace else if (mz->usage_in_excess >= mz_node->usage_in_excess) with else > equally. Also drop the comment which doesn't really explain much. > > Acked-by: Michal Hocko > Signed-off-by: Miaohe Lin Looks good to me. Acked-by: Johannes Weiner