Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1024955pxf; Thu, 18 Mar 2021 18:24:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4bn8371JYdf/CU6eAH11RF9p9tba2WxyyfJGfNeEtR4CDyURroAQ2mf17kuVmUabaObKl X-Received: by 2002:a17:906:ef2:: with SMTP id x18mr1601629eji.323.1616117060570; Thu, 18 Mar 2021 18:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616117060; cv=none; d=google.com; s=arc-20160816; b=bZC0lZCYuUcInNxajXCq7FcfpAFMpaEvUxBC5cKa6Z0LLrh/2nC60QfEyM6OFIbfgI WrC7uGFe3uvD+ikRoZ62uBnk9Y+JS2t6g6SdKwQUWnpvrDzKRZBo6wzw92eoqV3gZxI2 dyXL5Lpz/CGRiXOBO+6FQznkeHmfbtfmAmizG6atw6gAbDn+8LywzwbFdjhTWwRDKEVO M2UMDxn4lWO0yokU14SeKtDqdNpFblA9nnTojoEqp20+pyR6KvTxOlwbPvRhi3OKdOSI AziYCe/q+O3VWjZYys3TeGx9dL9BsACY8aG8NDnK3YCJqa9qMFl1ePm5/bBkuTS5/Cyy FadQ== 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=CW4McI8JkV+pieEAOjNv+vlbnY5aNnNxkeeFzG0tW8w=; b=eMHOMOsdZiBjb5dU+0dwTFfXanSPexWAIQNYQmJzvMlO/LEQ/hq+ZuS/9RO4BBg7cm qE/1z3I3d+WHJw1+iHaPEcfUQd5RQjqrAtfRoi+F7uZgmh/MXaicMMjH2hN6ITN/tA/i sb8uijPlC0yZ18ZaVZDyXvjPwn81sZBoO3pLXowkDpwx7afLjKuMMKOg6fiEwx6oq4DP qavlELFr6ZoR2DwadwAmaIS3sac9V6Go14ZgwqHsMNSABjFIwXev1qPdLPoULgweiRU6 WPDZC7E423mbRbnb8sQPNuNcXDLhx5IdE9T3CFLebMrDZRSwKN6Q4XJSkWlpi1LB1k13 qB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cDeKZHVF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si2933661edu.313.2021.03.18.18.23.58; Thu, 18 Mar 2021 18:24:20 -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=@google.com header.s=20161025 header.b=cDeKZHVF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbhCSBXB (ORCPT + 99 others); Thu, 18 Mar 2021 21:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbhCSBWw (ORCPT ); Thu, 18 Mar 2021 21:22:52 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3CEC06174A for ; Thu, 18 Mar 2021 18:22:51 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id n138so7517378lfa.3 for ; Thu, 18 Mar 2021 18:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CW4McI8JkV+pieEAOjNv+vlbnY5aNnNxkeeFzG0tW8w=; b=cDeKZHVFxabXMfipkJOP7Ibt7u7HVzssV//KJmna76gp11QpclpUxew/DscSIAVeT/ ILTnAIjHt4zXkV5rdRyMkftIzQhnm6/f4Fc1g/eFn3KcKwKdUaLvvXlCK9S6uSyQMJuy z8rnpEi1ijjr2S0a5dAwX48+eC9eYYzuuKyUyW8TWRdIdYlNVAScpyqUbBB+tzRz0DXp fwYpz0a0GpiFPVbBulejetQGfE9enAm6Qp3Az8rG1NCuJX/H5eajWjAZ3zEYkgbu4dGW 9z/ugj21ayFY1WgcWWhE9uw/ZP7lLMCb5UU9bvxnwru5IsOfv/1HtFzPEOaDcXXy7cUf fuhw== 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=CW4McI8JkV+pieEAOjNv+vlbnY5aNnNxkeeFzG0tW8w=; b=qly3HP+Hwnbc0HZJ9cmVPXBZuXJkyxsVJ3NTeX0sIG4jjxwD1IhXC8OcaACWEVhW+r t74MQP+H6PDqJ1pKw6NHsG2v84zrK5kvQTRpUjsu0E+cKlTVE7rFaYiqH0JXZ69FocjZ rsOCCnGStIkNCEnjPW+adSB/hyj/5K8n8RhWEWvK3xisiZ1uxGpof0Zhu6Aofarndm8v ktw8szcrzFpDrFf3+vx56T5afRIZI6KH/Y9rkzm/IeESJQnrBjs8h0doyty0GQtftUpr 8p4PTxsM3meXBvlZldFEjz0y/BIoz8P+ja+Z9znMqFAFvMXvE0iO1LqHU75SPXdy1fcQ iYTA== X-Gm-Message-State: AOAM533w9XKJrVtf6Dm6753W0PQbkRl0n+L/Yn1n7nkhdb9a8OUna2Y1 nmZWccZWC0EX1r71cko+1hO5q6JCrbMAtS54OvMRQnBIFk0= X-Received: by 2002:a19:ee19:: with SMTP id g25mr6696142lfb.83.1616116970201; Thu, 18 Mar 2021 18:22:50 -0700 (PDT) MIME-Version: 1.0 References: <20210318110658.60892-1-songmuchun@bytedance.com> <20210318110658.60892-4-songmuchun@bytedance.com> In-Reply-To: <20210318110658.60892-4-songmuchun@bytedance.com> From: Shakeel Butt Date: Thu, 18 Mar 2021 18:22:39 -0700 Message-ID: Subject: Re: [PATCH v4 3/5] mm: memcontrol: change ug->dummy_page only if memcg changed To: Muchun Song Cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Andrew Morton , Vladimir Davydov , LKML , Linux MM , Xiongchun duan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 18, 2021 at 4:08 AM 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 Reviewed-by: Shakeel Butt