Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5204461ybi; Tue, 28 May 2019 09:09:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM/jGJk74xDm6RiQ0ybphkGQVRFydTOvI6iW46PTVbhyVyxbhLk6BVsxMMGMrQf0MGot6L X-Received: by 2002:a17:902:8490:: with SMTP id c16mr464131plo.259.1559059760261; Tue, 28 May 2019 09:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559059760; cv=none; d=google.com; s=arc-20160816; b=tKyDdRCj3aNmSXbuIQkRZec3DUUvnJdM8+qgeKI0sL83CBmZ0Nd6fvdbnxRXeAJwBK 065EoT6WbHH9/4FY588hNo3+qOlPfuTS2EdqV7OQDRLqE/FHYjmfpTbt+8lOKZ48JPWU CBFq0tTWvkxg2SpTSZ2q9fcg1FYVhic0hm7q3GCGQxjXvvynBMGbAEW2/p/+de3AC39k IMt0EZneUW/n9hSlPNDE3F/jbYByLhscbKw/hB14bzYmATjX+wAtrAanhfSbb9H5Mteb 3N4Z9vcOfHRsf5nw+9rhsLNUchgWLulAYGkZHzblDoDZE1A4JAgEXwPVUEjIbPR1cr/j domQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DG8xV0grffTiWUQ6ZgEKPJ31mVWlpo+pKVsQ5e9lS30=; b=aNvPJssC79Z2FEd0uYPrYMhYTXMVs9gXYDxhlYRT1uTVEHw5GzFI6Hm7rT5vyndpFR 4di79wzPcdSC2q4RVwaN4bKeRbhDznQY243bu6M7fXVGlGNMRpLQkD+UjIdXnPrIkKTe 5zubds9Y1wyGOVGGgTp0ekP+XDXj+CiVSPVNzWY6LCbfTvGgY0X72hxpbg6HcxnQ6QM2 HoqpxJ+Qy7qlRmZR6VmMHh/ze7dUk6zh0Pde5/Zb9+BQkzK5jMnCnfsdylTLOENsabJ5 Vpw2Q52BUp+pC2GNAEh1xrR9GQ52FJoDQKCko9PyTBu7nw8DTNGapXv9h6W9UF7JUr90 89tw== 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 e4si3992052pjs.104.2019.05.28.09.08.56; Tue, 28 May 2019 09:09:20 -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 S1726650AbfE1QHp (ORCPT + 99 others); Tue, 28 May 2019 12:07:45 -0400 Received: from relay.sw.ru ([185.231.240.75]:38226 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbfE1QHp (ORCPT ); Tue, 28 May 2019 12:07:45 -0400 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hVedY-0005la-Dm; Tue, 28 May 2019 19:07:40 +0300 Subject: Re: [PATCH REBASED 1/4] mm: Move recent_rotated pages calculation to shrink_inactive_list() To: Johannes Weiner Cc: akpm@linux-foundation.org, daniel.m.jordan@oracle.com, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <155290113594.31489.16711525148390601318.stgit@localhost.localdomain> <155290127956.31489.3393586616054413298.stgit@localhost.localdomain> <20190528155134.GA14663@cmpxchg.org> From: Kirill Tkhai Message-ID: <3c081218-0dc9-54f2-839e-00adca089831@virtuozzo.com> Date: Tue, 28 May 2019 19:07:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190528155134.GA14663@cmpxchg.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.05.2019 18:51, Johannes Weiner wrote: > On Mon, Mar 18, 2019 at 12:27:59PM +0300, Kirill Tkhai wrote: >> @@ -1945,6 +1942,8 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, >> count_memcg_events(lruvec_memcg(lruvec), PGSTEAL_DIRECT, >> nr_reclaimed); >> } >> + reclaim_stat->recent_rotated[0] = stat.nr_activate[0]; >> + reclaim_stat->recent_rotated[1] = stat.nr_activate[1]; > > Surely this should be +=, right? > > Otherwise we maintain essentially no history of page rotations and > that wreaks havoc on the page cache vs. swapping reclaim balance. Sure, thanks. Kirill