Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp626310pxf; Thu, 18 Mar 2021 08:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqZmgHiaS3K9Gi2GGUvjrBu0nT+gxLg0T0wIUO4U++fLPay7b9cFE9tQl5JvalOYM66N9p X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr4267720edr.342.1616080467784; Thu, 18 Mar 2021 08:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616080467; cv=none; d=google.com; s=arc-20160816; b=SjSTsI7J4w1mnIBMm4YHvplU9NTDjsyEO8cSpQXVQG3VNALk++wT9qUfbeFVFTeSj3 63KczbDqnQ0IO8l9dnkHxCzQbhGyQ+uHHuZIr3wi+l9ZGSidwAml02/dShbEnCfys4F/ CBm5xXeAzmBCVJcWLLoP7q57K2ivLhD2KbVJ8DIXTQk27dX5PUhIP1jBInZ1/rWNGRAC 5unguCkB2bpfD+BmoBwnqhOsmhrA5tDxVxAMjNlVybeBt8u+rta11ruNRSJ5StyDh4RW j7wpCZmIlmkMjRIQLisB4RehICok34C/IAzfDfLdUVsnwxfy0ZmT0m7xPd3w1FLccF8s J/FQ== 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=MWKeb3ggn5dIOWz1bbbP6KWW8zV+fgH0S33ydz73K40=; b=hjzlLi1cVNy+J6PCtVjaFp08SJ7Qk36n64n6OV8pCNCVO+cfurSEKLNUv47cmF8vbk NPpvRxEzURFOIpMvgHFHJYR8wFVbHYqqHXZ/eOsTo+Em8lVWNRqdfe4x4NRMXBmROwOt ViacLMDPdEZbtmv38/9W0vEsyaMsMrfP2quBsmBBZASvxnfhIwrvzkGyF9wsfOkcBG5X G238CZ+8x5cvSC/g4Hm6UrKGkwhOIuwlN0pirDRQnvy0TRNi7hLNdKTcabtUt88ufx6Z +/oSooS6N8bbcicizd+k6mPIk4N/mloAbaOw2ZYwxUEkaEEYI3P6Z22vP1dhWxdAqnWd 6fhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=oJdI5+VQ; 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 k7si1715074ejs.165.2021.03.18.08.14.05; Thu, 18 Mar 2021 08:14:27 -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=oJdI5+VQ; 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 S231628AbhCRPLb (ORCPT + 99 others); Thu, 18 Mar 2021 11:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231564AbhCRPLI (ORCPT ); Thu, 18 Mar 2021 11:11:08 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE92C06174A for ; Thu, 18 Mar 2021 08:11:08 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id d20so2318515qkc.2 for ; Thu, 18 Mar 2021 08:11:08 -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=MWKeb3ggn5dIOWz1bbbP6KWW8zV+fgH0S33ydz73K40=; b=oJdI5+VQ77I/Xsg1UoAmzbVV5ykG+VEUECp6rHpE7DctVJwC1+GuLouFtJHobzV807 AU+XXyaXmY3ERZk4YUdcCUBTQZi00bTH6IO969As968zmtQQajcCLchwCRlLJAEqdvGk Eh9+4YumegO4ZYw/V0XI/cT4UeoYwpN+M6lGLfJWgcZWJHPH5Iz7ScmnLF9ixTM+7wnt XhpNnl/w70xhFLSBQQtuUYW7ElZKrKhYRqcITGJ52p46/OVRzsbeRq9csiZSEeAZ+ody 50npKbz7mpbTJktHOD9klIEP+CHoMLDkGSQ8BzoDiau7hvCxzJDFJ25HFjJ5gvo/3JWc kCJQ== 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=MWKeb3ggn5dIOWz1bbbP6KWW8zV+fgH0S33ydz73K40=; b=q6EiTfdXGo3IZXLL8G8baVwJhcQVTFbPKBVDuzh2dac2boBFyhlDSZ+k2gpfKCL8CG 6qFf2t9HTDxjPXdAMDbSoov/LsRFt3a3LaD6/v7zGQHZOI8MbGiDf85+UmiMFT7h8Eo3 VUO9Mia9Hx2WqpBke9X2gbK40GIyQKIICK6eK1MBBrU72mcbyMkvpw3L2gGs6QN3Fvd6 ZG5+J8jLdam+Onq9nFLyJPedoPsBqwPdrPuvQUztZfPvBGTLivpfq+wsnuJ6ZRUCuKpj GyIgRDQnmNZFrRWZcgucdPEq4l+rQkj41leNP0nPM/hlZJQDcNwJmBJQcUXVOkajlvgt MiAg== X-Gm-Message-State: AOAM531ib4muXKpaOO1kekVxRnDF8M5ygstAmy/+5hlVqpJ4gw3gNFkI jGivYjRf/NYq2bCfK3iL3YlfUA== X-Received: by 2002:a37:a10a:: with SMTP id k10mr4665080qke.171.1616080267971; Thu, 18 Mar 2021 08:11:07 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:e46c]) by smtp.gmail.com with ESMTPSA id d84sm1910262qke.53.2021.03.18.08.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 08:11:07 -0700 (PDT) Date: Thu, 18 Mar 2021 11:11:06 -0400 From: Johannes Weiner To: Muchun Song Cc: guro@fb.com, mhocko@kernel.org, akpm@linux-foundation.org, shakeelb@google.com, vdavydov.dev@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com Subject: Re: [PATCH v4 3/5] mm: memcontrol: change ug->dummy_page only if memcg changed Message-ID: References: <20210318110658.60892-1-songmuchun@bytedance.com> <20210318110658.60892-4-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210318110658.60892-4-songmuchun@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 18, 2021 at 07:06:56PM +0800, Muchun Song wrote: > Just like assignment to ug->memcg, we only need to update ug->dummy_page > if memcg changed. So move it to there. This is a very small optimization. > > Signed-off-by: Muchun Song Acked-by: Johannes Weiner