Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp12062pxk; Wed, 23 Sep 2020 20:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjlcIvBcDANaEz8zw+6DL7eo3pRFKc2GEVpLaeCoUazEtzYpGfa9fiMtd5aZYNROG5NGic X-Received: by 2002:a05:6402:1acf:: with SMTP id ba15mr2548271edb.305.1600918271617; Wed, 23 Sep 2020 20:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600918271; cv=none; d=google.com; s=arc-20160816; b=nRDQH9oB7EYAyzS8sCC55Eta21vOL7dQ59aXyC3fqKxL6oa7eczLWY4oqop5bHJ5TU TCreNLdcMDHlQEzOSFBtd/Beauq+L4XcK+nqf0i1EDkDpZjxFeNWMVzqRMs0crBtEJjZ 8KhNGmtfo23/ST/EGWsPr1vlFSsnvtre2akIJXZ43MaeOYAQQZw4A63tBDaOoY59n++G CLEPLUaTms452Gzar5hYNQab27VBAgCi2oMPQa6L1n8pgW6GXaGxAntkR5w8bB3GVwA1 BSINyOKSJFwxFNiy1Fpr5Gfm3dHxC2+uSb1Ysn+vAWTVonbQsXA8Aq/AfeZsjK9PCtfo hVFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=hY+No9B8ur5Tn2Ukv0CWZOJAI2NjFkg+AwMDzaFgUUk=; b=kn/0rx3Os1ghl2/x2mk0w/tplIkfhSlwakcTZ3/wPd7rHyqR9d/HjHQ0M2/esyPCsJ HaWAcSidE9BmqlTVnU2RcbM93l0HTFKvcsnWbrkuzvaEfcy18+homl+yUKtbRpbCXoSs dQQL/SqoBfW61Gv13ZK8q4Pe+wFBbrYc6fdfGzGi4YpdUFd/Sb6TeVuIiuLdr5ItAZG5 ZJzZvh1apwYDdBOGabWi6qjnwDcmFeuBGd4x1V0hrAVIhh5fHkQ32aAwDVceC/jvBvZ0 LBl2f26G2qj7S/Rhn0Op94nwKYroeraCLObK5x0HsAj6YVGxv+jldHKHpU5IF0vjJRyN ewSg== ARC-Authentication-Results: i=1; mx.google.com; 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa23si1224158ejb.125.2020.09.23.20.30.48; Wed, 23 Sep 2020 20:31:11 -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; 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbgIXD3Y (ORCPT + 99 others); Wed, 23 Sep 2020 23:29:24 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:41282 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbgIXD2t (ORCPT ); Wed, 23 Sep 2020 23:28:49 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=24;SR=0;TI=SMTPD_---0U9w0Ss1_1600918116; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U9w0Ss1_1600918116) by smtp.aliyun-inc.com(127.0.0.1); Thu, 24 Sep 2020 11:28:42 +0800 From: Alex Shi To: akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com, aaron.lwe@gmail.com Cc: Alexander Duyck , Michal Hocko Subject: [PATCH v19 12/20] mm/vmscan: remove lruvec reget in move_pages_to_lru Date: Thu, 24 Sep 2020 11:28:27 +0800 Message-Id: <1600918115-22007-13-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600918115-22007-1-git-send-email-alex.shi@linux.alibaba.com> References: <1600918115-22007-1-git-send-email-alex.shi@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A isolated page shouldn't be recharged by memcg since the memcg migration isn't possible at the time. So remove unnecessary regetting. Thanks to Alexander Duyck for pointing this out. Signed-off-by: Alex Shi Acked-by: Hugh Dickins Cc: Alexander Duyck Cc: Andrew Morton Cc: Konstantin Khlebnikov Cc: Michal Hocko Cc: Hugh Dickins Cc: Johannes Weiner Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Cc: cgroups@vger.kernel.org --- mm/vmscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 656558bbf399..953a068b3fc7 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1885,7 +1885,8 @@ static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec, continue; } - lruvec = mem_cgroup_page_lruvec(page, pgdat); + VM_BUG_ON_PAGE(mem_cgroup_page_lruvec(page, page_pgdat(page)) + != lruvec, page); lru = page_lru(page); nr_pages = thp_nr_pages(page); -- 1.8.3.1