Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3937607ybb; Tue, 31 Mar 2020 15:17:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vunoH7p5oXJ+Wqfi9Mr9ym/Thqizpd0ErNmCbTe9CztW9+eppDo/9MDcVxzcVzeBnduDk1z X-Received: by 2002:a9d:27c7:: with SMTP id c65mr15309908otb.318.1585693054173; Tue, 31 Mar 2020 15:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585693054; cv=none; d=google.com; s=arc-20160816; b=yYW+Dw5a0/WFa3FzvUk0VfJNomco5PYSjmXZlCj1U7s3NgbjCQx6uVuXGmlP+rOZ8G bP8i+TJGKbONbX8qOjbOdx4LWdhPj4n7+jboV/suKFCFiotHb1nWRqHgyh+1lEAZAPrb A9nE8iyMKD9JMNAIWG/KwaccJP6EG1yVWNNDSZhcyPNmkf5PMiq81Gg1PQhPFS9mX6RZ FmotriehjXTPDMUVK4x6vBv+4HMBLjTGMlb+U4k8fiQTKwIAk/PU4xfuBgggzZB8kjKm KixkGK2sYF1PDc9jymPbsY9EFPyTZYhAV0olqA85FY2AV5XyfeaYTKREPxuLG2yjhOq6 NS5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=95Z+TZZn0HPFjO2HrghxVOqovmQHbw7OTxMyAmZ3sRc=; b=Y7umCqu71aWsHszNDjgAJX6eK3iXbC2DxsZFjKjYsb5pI+t3Kxn1QE+qqpsJOFpgY6 O+CnfDXsLowhU2jpwoqdaR03nJoGngcFl8Fa05UJZY8+qAkE8yN7A/RYVUelPZ7LpjE9 /X6zuyZ3f428xj6JOb039mdiKdnGsJ3LPhRXjBxDtSBW2902yQs2pBhSlAjUc/8px1Y0 anc5MrV+VL7CZVrpAiiCTaMvLJdHPQxIMYX/xjK8JYtYT94uWsaGA90rs0tQxLzNiP5X Klri3J+B5T2JMCjswudMwlro1icKo5U6Ag2DtMiFSTlqXNvMhYIdNOGnbTapueeteylI 9zpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MO7zOLCi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h27si8134669ots.293.2020.03.31.15.17.21; Tue, 31 Mar 2020 15:17:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MO7zOLCi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731386AbgCaWQE (ORCPT + 99 others); Tue, 31 Mar 2020 18:16:04 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41024 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729647AbgCaWQE (ORCPT ); Tue, 31 Mar 2020 18:16:04 -0400 Received: by mail-wr1-f65.google.com with SMTP id h9so28128620wrc.8 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=PwjUoAnUH7rDoPSe6zfTfGz2VITcU0G/82M5wpllo1wU3IZCgwbZ6S4oVKwxa2Jl1G RqUu4xpQ9n5jB3A8HSoM5J7PzAicx2gHoOzcrSuRFnC+eR3gtfsioSWfNPyVAqBkPLAm ySkKgiaR5eq5ox9/IPsyUm44eE8c4UDBwlYUPO+42etKBLB2ZSU4Pma5w/oNU8Psbpnp 5R/yfZzJDLjs+0bTNXApavyKXOSXGb/+qLOpO1fMU+qEqZuq+IRwflcHCOE9HTW9gJ8c MwJr1vil/W8+ZxeZHs45yD2aECrl32bgJL0ymkCDRgPdRkOTdEIasDSt7zSjykVXOzhi kf+A== X-Gm-Message-State: ANhLgQ2EZ94q7YzE2rbbZEpbaldnsNJ5yIv7Bc6yosMN9vZUIW7OdRME V/NyUDDa5w4rUMF5N9lOYqI= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We already defined the helper update_lru_size(). Let's use this to reduce code duplication. Signed-off-by: Wei Yang --- 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]); } } -- 2.23.0