Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6498541ybi; Wed, 29 May 2019 08:40:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnjWEXJ9EMOwjw9X9jcvCDHYygqZj1fDHXumP+cpBUusF/Rq7wTfsVtUz4B33TYUDtRY4x X-Received: by 2002:a62:6d41:: with SMTP id i62mr110986355pfc.227.1559144447019; Wed, 29 May 2019 08:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559144447; cv=none; d=google.com; s=arc-20160816; b=eoOg5umTYe877aV7DATE6SM7dZYyHZvA0x3iBSQpsoeBS4QJu+sq8z7fmsC9Hp3v8k y1QcgNSOGfPeZ8nQYadE5f5PvloLlGsbvGWnPNMnWFoBnHtYGD2B0egq2xuGuOUibufR pHV+0NbCORn2oJIUdsF08CIwQNOff6J5ahvd9PKyZnM80urxIiLwU8WQ3hdUJEPT/DIN w4vczHI15AMUlC2Ei9wVGJb0GfTuj6WB6L006uqaEL8QIgYQlALGSvHK35YR6GvRKkzd jD3jz/dnQgyA2B17AkxozB7+n3LHE9D58+rh+6RUir48DVDsaNCLZSwEXmTAu3Ufk39+ E//g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4TQBgESvWIyC2qv4jAqQ8/XfYwZ1mN0/SAx+fIQikaw=; b=dfuaLjdEggaltZqj38imleqA4BqN2XYmKvV9YclrNpRQTojnPWsSKqmVe+JsyOqxD8 KebzVEo0Fo1/6k8WdZQ0PQo7tooaqtwl97HrfUKW5M9prQidgWR1YN+V1eM5ntNiSSTj 5WseVqvEElqdS/7xsHztaD4SPZZcyBSm4WOD6hSMCpt6ue7wCijuzQQuPsnb1excvbQZ XwU20sW9JiNjBcPmlHKBY5uNEZJWCB4nEtEvujBrh4s6Hszscv89SANKjP80q1FMVAn8 LqSrxRO2tXE7a08YhXhl1AtRSFfamzIi2miJ4h/4JsDmcEaQ3Zn5GF/nz68mV53JX8H9 nr5A== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si26635939pgp.153.2019.05.29.08.40.28; Wed, 29 May 2019 08:40:47 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbfE2Pik (ORCPT + 99 others); Wed, 29 May 2019 11:38:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:42932 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726012AbfE2Pij (ORCPT ); Wed, 29 May 2019 11:38:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A3677AC50; Wed, 29 May 2019 15:38:38 +0000 (UTC) Date: Wed, 29 May 2019 17:38:36 +0200 From: Michal Hocko To: Kirill Tkhai Cc: akpm@linux-foundation.org, daniel.m.jordan@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: Fix recent_rotated history Message-ID: <20190529153836.GF18589@dhcp22.suse.cz> References: <155905972210.26456.11178359431724024112.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155905972210.26456.11178359431724024112.stgit@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 28-05-19 19:09:02, Kirill Tkhai wrote: > 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 I didn't get to review the original bug series but this one looks obviously correct. Acked-by: Michal Hocko > --- > 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); > > -- Michal Hocko SUSE Labs