Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp329701pxx; Thu, 29 Oct 2020 03:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUw53burrv+JQYMV8Y+YiCxIn4WUZUEQfkiWHHAUrum+MpAInmq7JMIpDNcDKepma7IEUB X-Received: by 2002:a05:6402:3133:: with SMTP id dd19mr3418806edb.100.1603968588418; Thu, 29 Oct 2020 03:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603968588; cv=none; d=google.com; s=arc-20160816; b=XffD4NAklmb6Kv7x5iaAdXjqHCRzZGuV21jmi/E2vpIzHx4cnCzz1xzPdHkoXBb2By zq/TUhbrsCgGTFFhOrwKUHWXj1soJeLBLV28QjxdazkIkQneLFQ26imucjNtm48R3Zbh HYqIstagdLQYDalscu6YYeX3mj+F1nOUZwXMyuIWfMzuPbB0khft4xmT7oApqUk1eg9f 7Smb2ttYGGMshhCZeGiU0YhE9jZkLzfqU/K7/zCZJ23UAo4B6X3KkMC178QaGH+8GByV zTNSyjbRnmRQt9z5k0jyJj9uzxGgUOsLURjykoeBcA4gdRV/G6r2YzpRe+rEtJlzpr0G K2YA== 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=tT4FIr/Z4UiBPGK3D/rVaQPiB+weNy6Kz+cv2H30+Ag=; b=EBgMv1GUCpehJKFFupjA7SHRjjD4TsjlAIdtaEKmbNhWC7rJq0NW0lXt6bE4DTqOu5 kDKBYfP/BufUjZk69jESj1Imnkt08Larcbn3v5cmxol76A10V8cbrTpXKJrQwQPkydYv Kl1ermlMebIUdj+hmo7N+8m2Ym07JzkiZFnE84+3CsG1d/ZhGEp/u16Lby0FGmwb9tcr z1IAKSNFj22em6U5lzV6oxTwq1q1MZgij3odr6zkMeUEPp0RtLXve4j/CKCC1NUM2x7F lH5xpVT6rkSrYn85fSMjjhtDidN9wp+a+U9tyjK8dCuEnc4KZmQv6p4Qhml/gxBuJWFG 5F1Q== 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 s8si1803272edc.481.2020.10.29.03.49.25; Thu, 29 Oct 2020 03:49:48 -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 S1727106AbgJ2Kq1 (ORCPT + 99 others); Thu, 29 Oct 2020 06:46:27 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:59754 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726794AbgJ2Kpl (ORCPT ); Thu, 29 Oct 2020 06:45:41 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=23;SR=0;TI=SMTPD_---0UDXwDyN_1603968328; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UDXwDyN_1603968328) by smtp.aliyun-inc.com(127.0.0.1); Thu, 29 Oct 2020 18:45:33 +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 Cc: Alexander Duyck , Michal Hocko Subject: [PATCH v20 12/20] mm/vmscan: remove lruvec reget in move_pages_to_lru Date: Thu, 29 Oct 2020 18:44:57 +0800 Message-Id: <1603968305-8026-13-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1603968305-8026-1-git-send-email-alex.shi@linux.alibaba.com> References: <1603968305-8026-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 42bac12aacb4..845733afccde 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1887,7 +1887,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