Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1360098pxf; Fri, 2 Apr 2021 08:25:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdEjtX5Umq18IpVGUhywysXWP2c1XWgT1IqOb4NTLNlDsgd6zumIlGXG+r9tTpecLZkld+ X-Received: by 2002:aa7:da46:: with SMTP id w6mr16325024eds.40.1617377116430; Fri, 02 Apr 2021 08:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617377116; cv=none; d=google.com; s=arc-20160816; b=MU9RThjz2166Z6Qxvk6OE9+PBkTAG8hb+GC8q/kwr0T2c7obv7JL2/a8KNY+ruhGVQ EoCeqgp/5eZr8C80zVy3O4EzC39qyk1oJ2ZKm1jqz1GucuKyRMVW6h2jzaucEpu+1iSH xWtOqAizqdwL3IKN66g9Xhi4jri30p2qf61fQB9+o23DrIUR7hi6RsH4vefhjDZMoX1F /ixlxCpduA2Yrkypi3ewatYTz1BM73vgUgmrnRpXOB61eMjasY+C2drVvBzSv8sewYC7 rDKuUln9dCOl9TRRMXp3fwHaVIApZnWq+/TWGiJODrnczzq2wmkX3di3ej6fjR0FO1F/ yrwA== 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=HqOSSjP8VsKEgoLReA8Ec/GP45XGwwALUfgS/ucZBPM=; b=CCt98K3WyE0sA1LfhPvtb3inQf3qglNG6kZSkyAEwRBw8pFNNXG9tGN1kYEkQ0Fefi AFyJlTvB/4uEQsI2df1BLLt4a/qMsbIlMLdshwWiRqAfUeKs5xWnMoPpYTgN7p2sR03K v004bVdSVsye3LWLRHVJpKaf/KGWuw2Zg+tcdamIfLPfIMzKpKbiOsE9U3V/yKTnLUAd 2+DjVMu8HiiIzx7TRZtH8f/fhgOml02v/YpgceY+jcXnMaF/17kAxmH0LFX4G09AQaLd IHQHsV2iZaIXXoUWP1wy578KbzumJVLysn/8Zq+1y8/+1XCEQXegjEPpJh8RjSvDQ7hr BHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=KYQa9bzt; 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 bi6si7126095edb.419.2021.04.02.08.24.53; Fri, 02 Apr 2021 08:25:16 -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=KYQa9bzt; 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 S236094AbhDBPWV (ORCPT + 99 others); Fri, 2 Apr 2021 11:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236050AbhDBPWT (ORCPT ); Fri, 2 Apr 2021 11:22:19 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8BF7C061788 for ; Fri, 2 Apr 2021 08:22:14 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id t16so2595008qvr.12 for ; Fri, 02 Apr 2021 08:22:14 -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=Nawh3k2s6cBNgXQXccLQi5OHNMt1dI0Jj6UieeMfgRc5VveiaCttoE5MYcNgaREUoA MrA9kseIn/7a72tp0mY2Gpa4CCRYkEh9N09GxETyncX4cbvYiVLLnk+QMuz8sw/QEQHR HtGbeuW6I1hgyUEz/Zu4liHZVYNHiKTn2TudUPVDRSsVfrpD2XqK2B0rvFGVR0DnkOL7 FaMFzkRdtrQ4eEAAwAR1bEUYVs0U8EdlZdEVX9M7xIX5RDlSQ3h1nLq1daW52ZKl9NYc BJAyE1lis0R+f2Q3TUsKUhcQC8aFvOCDW7eRWWnbSuuWP/QgGPRBYNYLuJz7rtweDFKD bxpg== X-Gm-Message-State: AOAM532Aay3PfvyzUBOiXfFcRhU5elibhuNG/d6Y29/OHK86wH9oUykt j9YXNw63KYyShNNE5ZPnacvt2Q== 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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