From patchwork Tue Mar 31 22:15:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11468457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0507E1667 for ; Tue, 31 Mar 2020 22:16:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BC65520838 for ; Tue, 31 Mar 2020 22:16:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MO7zOLCi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC65520838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F21EC6B000E; Tue, 31 Mar 2020 18:16:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id ED33C6B0037; Tue, 31 Mar 2020 18:16:04 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC0FB6B006C; Tue, 31 Mar 2020 18:16:04 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id C145C6B000E for ; Tue, 31 Mar 2020 18:16:04 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 596B2181AEF09 for ; Tue, 31 Mar 2020 22:16:04 +0000 (UTC) X-FDA: 76657066248.28.cord75_8c4af73bd8d1b X-Spam-Summary: 2,0,0,30f4d46296301631,d41d8cd98f00b204,richard.weiyang@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1539:1568:1711:1714:1730:1747:1777:1792:2393:2559:2562:2898:3138:3139:3140:3141:3142:3865:3867:4321:5007:6261:6653:7514:9413:10004:11026:11658:11914:12043:12296:12297:12438:12517:12519:12555:12895:12986:13069:13311:13357:14181:14384:14394:14687:14721:21080:21444:21451:21627:21666:30012:30054:30070,0,RBL:209.85.221.68:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: cord75_8c4af73bd8d1b X-Filterd-Recvd-Size: 3325 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 31 Mar 2020 22:16:03 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id w10so28237029wrm.4 for ; Tue, 31 Mar 2020 15:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=95Z+TZZn0HPFjO2HrghxVOqovmQHbw7OTxMyAmZ3sRc=; b=MO7zOLCiY86xDx8sq7kkM0P89eOedea3TzJqzFOD0hxMsJZqrmy6kNehnSZP8djWlt 0v1sSJ2OUtq1Tj1tKhOUcxWxieoJU/IKAeNW38DxUrAqavHzqLYN5PxlgCjo9oLoPnJG X2Na2fz/qcW885PSD+yRiO2uIvLiabu6I3ubjFkcXpHEf335YamKTH7FiI8aS/sBY4Hj jA6EECRQ/lIy/+tREutY3F/43eMa2EITWUC/P2eVlxzwqTwfKBt/FSYHDkDbiQCL7dCw 8DgEgKv/qJzvvEOa8zxmZi7x7Tzxp+vYdVgvZb8vjyJpSSrQzVoDuyvj6grdBDwmPKoQ ZUxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=95Z+TZZn0HPFjO2HrghxVOqovmQHbw7OTxMyAmZ3sRc=; b=jZjNFvIIDmKCT/x5mORqGo038u0mOfuT+rwhx9raK5uLIRR5JTXpswDxdM7lgIG2sx lO20JtDdBlNgjYc/wWWIiuQSiKQpf0ZSASAWETYYpwEIhehHKwqBhQphzZKAjRHxCwyV FtUZbIaJZFdiazoSbW7NUMkarVM3wCdTjOa4pCA5pPlCrPOx5xMt12o8Pi9ksbH+ugC3 Ia0oskjQxj5A2fIDrpd9G3sdt/LBjAzOhuDexQ7nLJ6cD6dP4kEVviwo5rGNHfBdpFDC sUAYKrZmFoYVEVfyVID/2ERVfIr5elYhetn/8VHXvY0XsXw9E0AN1AMi/9accDySRR+7 kQbQ== X-Gm-Message-State: ANhLgQ1b5n3HHFOb7N9HxWTmxD29DMJwdSGbTiNUyPVaP6L8Avo2nAxz WRNDv1o4fwF9zPrgbhQbeoA= X-Google-Smtp-Source: ADFU+vtLFAEZp/8iVqmCJlpi/mOzRDbXPYHUteroc5yB3gS1Tp2FLocJfmvboaklFU8cPpQoz2Sd3w== X-Received: by 2002:adf:dd10:: with SMTP id a16mr22219457wrm.26.1585692962713; Tue, 31 Mar 2020 15:16:02 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id x16sm155681wrn.71.2020.03.31.15.16.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Mar 2020 15:16:02 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH] mm/vmscan.c: use update_lru_size() in update_lru_sizes() Date: Tue, 31 Mar 2020 22:15:50 +0000 Message-Id: <20200331221550.1011-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 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: We already defined the helper update_lru_size(). Let's use this to reduce code duplication. Signed-off-by: Wei Yang Reviewed-by: Baoquan He Acked-by: Michal Hocko --- mm/vmscan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index f92858e5c2e3..a4fdf3dc8887 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1603,10 +1603,7 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec, if (!nr_zone_taken[zid]) continue; - __update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); -#ifdef CONFIG_MEMCG - mem_cgroup_update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); -#endif + update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); } }