From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0417FC433ED for ; Fri, 2 Apr 2021 15:22:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6ABB961157 for ; Fri, 2 Apr 2021 15:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ABB961157 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EAD5B6B0074; Fri, 2 Apr 2021 11:22:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E5C3B6B0075; Fri, 2 Apr 2021 11:22:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D23746B007D; Fri, 2 Apr 2021 11:22:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id B543F6B0074 for ; Fri, 2 Apr 2021 11:22:14 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6AE9F184875A2 for ; Fri, 2 Apr 2021 15:22:14 +0000 (UTC) X-FDA: 77987792988.38.16953D5 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by imf02.hostedemail.com (Postfix) with ESMTP id 8849740002C0 for ; Fri, 2 Apr 2021 15:22:10 +0000 (UTC) Received: by mail-qv1-f41.google.com with SMTP id x27so2633793qvd.2 for ; Fri, 02 Apr 2021 08:22:13 -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=HqOSSjP8VsKEgoLReA8Ec/GP45XGwwALUfgS/ucZBPM=; b=KYQa9bztnFxv6sAzKeiaQcAYtIsQwZ0luHax+BysFvRuTXQu0GO2uAvJMu1kcAe36c dmqdOJVSQeks1xf68at2nxJWx5Bbv6g05ah2X//bP3T2/Ys2vds1FRkHy246K/NVLbnM kvwS9On3JQrzInxrmjnheYDibvhFzlMWVZWYRWzHFNPjD2xtv6fzwMfSeBJY57Rwj5Rb 4rq/LgPcjapkP3QXh/R1Bdn3mF14MtU3RM1iULXOGAgW3aGRen/B/4KC+LEualyEbHpK bzDuM6gGk7zxYPKW3ywGAA6yhoCmNnDIDYFA6rKio700BVLIzZEpCsnbQmnY4ug2zimj BsRA== 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=HqOSSjP8VsKEgoLReA8Ec/GP45XGwwALUfgS/ucZBPM=; b=XI1F67FRhV7hUl2q3g1XO+INupxg0ftr0mVFdiqDzewgTLK1RMoKUGt006vcFb/7lE ByzpNqId/S1gPAyq+fpPGyo+D9gijzwkZPi8rnjYgeQkTwsFDdYqFvNjZEob00WwLs8a vdKGQamqUa+18xRb32zAOpYZn5CdokVRzUHLvuNTzxjCafHvy3S2HpdbvZL8jBc/1vHB KgtMEplPLQh8PMdfcJNcFleEc9inH7QP3phnA4+Uc9rt3n9IWMvFju9HuuqVtC7HwlPM u7/N5n47B6uutzaIzteCUBXFCNobzTTMKK36LLexEQNhT8nawTwgrJzyF1sqKHEtZD6b /vVA== X-Gm-Message-State: AOAM533mvfSJmkZcAjvqVaaSkKbd9BQVWVzbfpe9r+ld2lbA/7ArkYa8 EfYJzhTtEbw3/yGpPXok1PYAcQ== X-Google-Smtp-Source: ABdhPJx0n2GqdaR7E5PJlOTvX1JWTrudxl2iL00LAIetmK8ViYSynmVhAhRg/LqLIFVhRXwRjiPedg== X-Received: by 2002:a0c:9cc2:: with SMTP id j2mr13569952qvf.2.1617376933225; Fri, 02 Apr 2021 08:22:13 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:8ca7]) by smtp.gmail.com with ESMTPSA id t24sm6800763qto.23.2021.04.02.08.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 08:22:12 -0700 (PDT) Date: Fri, 2 Apr 2021 11:22:11 -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: [RFC PATCH 03/15] mm: memcontrol: remove the pgdata parameter of mem_cgroup_page_lruvec Message-ID: References: <20210330101531.82752-1-songmuchun@bytedance.com> <20210330101531.82752-4-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210330101531.82752-4-songmuchun@bytedance.com> X-Rspamd-Queue-Id: 8849740002C0 X-Stat-Signature: ewrmoff7zn8b918t9zuk3inrgpp9g7fj X-Rspamd-Server: rspam02 Received-SPF: none (cmpxchg.org>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=mail-qv1-f41.google.com; client-ip=209.85.219.41 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617376930-266095 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Mar 30, 2021 at 06:15:19PM +0800, Muchun Song wrote: > All the callers of mem_cgroup_page_lruvec() just pass page_pgdat(page) > as the 2nd parameter to it (except isolate_migratepages_block()). But > for isolate_migratepages_block(), the page_pgdat(page) is also equal > to the local variable of @pgdat. So mem_cgroup_page_lruvec() do not > need the pgdat parameter. Just remove it to simplify the code. > > Signed-off-by: Muchun Song There is a minor benefit in not doing the page_pgdat() lookup twice. But I think it only really matters on 32-bit NUMA, where we have more than one node but not enough space in page->flags to store the nid, and so page_to_nid() is out-of-line and needs to go through section. Those setups aren't really around anymore, and certainly don't justify the hassle (and potential bugs) of the awkward interface. Acked-by: Johannes Weiner