Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5206513ybi; Tue, 28 May 2019 09:10:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4XtkPhBlvxY7KbZLFJsexp8Lacd5mztiIMF/lhyd3Yie6zLEVRbMcbRaNfdRFR1p/YK2s X-Received: by 2002:a63:224a:: with SMTP id t10mr20262481pgm.27.1559059845526; Tue, 28 May 2019 09:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559059845; cv=none; d=google.com; s=arc-20160816; b=y8j49q6wdmx7AJuEXLJ6vtgFS5mtBHLjNuwrS2B6JqnUZVqDwy6HLH5BXpAEIMQl1w xCRUuSjU/0/NYBk6bcsSf0dd8QZf56XWl2DScgTVYFKPrgPDblRahjL75rALfUHa5cpk HpO7PGfE9S++of+T0qD+zw5PdpziLY5hVCWFcRckUNgmrp8XqOlDQrrudJx5Yx8xnrWT 9GVKMibEEPmUI8mS3uFPlVja/+YQs/BSO/NgpyNAkZHCBj6AsfmvTG8Cginf1/EAKi6H XCf4MBACMgEFeKfm84mekbLJdvV20TY6JhawBG1FJzxdhuGihSpwlsfpc8q3u+nIORel 0kDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:to:from:subject; bh=lGXYVbVFDLEG+3o+OEguFFx9LFqpstQwPQERo0dQPlg=; b=Y8pYIop7MFP95jEoZcDYaiVhE6FNe2hcXB+C9yZswy9YuiB2WoJpnlfoShfOmSSwdX 9wdCqF8KNxmNIXEBTS4GDOH7MdoeXPXG/2Jo4QHl2VGoI8O4qMp9SbxXQ0FLzEa+F1Fw hE4JkP/tHoff5aoq1ERiZ0m5a53uZa18Hpv3ECmellJycoElgOnA3Wb3+SG3Q+B9zIXd fFCEb9j73h8ocMwOkamw+0UgV4btStk1GVbupYdC03riHGdAOiDyr3bEW6+byVl8FXwd 4HgmadB1NQUFdRrucDL95J4LGJqQfwsZd1FqVLFyWqKPknAor4GKH2IQcRPwp0tQ5Lpa +jEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj18si25220401plb.328.2019.05.28.09.10.28; Tue, 28 May 2019 09:10:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726939AbfE1QJF (ORCPT + 99 others); Tue, 28 May 2019 12:09:05 -0400 Received: from relay.sw.ru ([185.231.240.75]:38258 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfE1QJF (ORCPT ); Tue, 28 May 2019 12:09:05 -0400 Received: from [172.16.25.169] (helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hVeet-0005lz-4x; Tue, 28 May 2019 19:09:03 +0300 Subject: [PATCH] mm: Fix recent_rotated history From: Kirill Tkhai To: akpm@linux-foundation.org, daniel.m.jordan@oracle.com, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ktkhai@virtuozzo.com Date: Tue, 28 May 2019 19:09:02 +0300 Message-ID: <155905972210.26456.11178359431724024112.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes pointed that after commit 886cf1901db9 we lost all zone_reclaim_stat::recent_rotated history. This commit fixes that. Fixes: 886cf1901db9 "mm: move recent_rotated pages calculation to shrink_inactive_list()" Reported-by: Johannes Weiner Signed-off-by: Kirill Tkhai --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index d9c3e873eca6..1d49329a4d7d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1953,8 +1953,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, if (global_reclaim(sc)) __count_vm_events(item, nr_reclaimed); __count_memcg_events(lruvec_memcg(lruvec), item, nr_reclaimed); - reclaim_stat->recent_rotated[0] = stat.nr_activate[0]; - reclaim_stat->recent_rotated[1] = stat.nr_activate[1]; + reclaim_stat->recent_rotated[0] += stat.nr_activate[0]; + reclaim_stat->recent_rotated[1] += stat.nr_activate[1]; move_pages_to_lru(lruvec, &page_list);