From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756404AbcA2PSK (ORCPT ); Fri, 29 Jan 2016 10:18:10 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35680 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756341AbcA2PR5 (ORCPT ); Fri, 29 Jan 2016 10:17:57 -0500 Date: Fri, 29 Jan 2016 16:17:55 +0100 From: Michal Hocko To: Tetsuo Handa Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, hannes@cmpxchg.org, mgorman@suse.de, rientjes@google.com, hillf.zj@alibaba-inc.com, kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/3] mm, vmscan: make zone_reclaimable_pages more precise Message-ID: <20160129151755.GE32174@dhcp22.suse.cz> References: <1450203586-10959-1-git-send-email-mhocko@kernel.org> <1454015979-9985-1-git-send-email-mhocko@kernel.org> <201601291935.BGJ95389.VOLMFOOHFStQFJ@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201601291935.BGJ95389.VOLMFOOHFStQFJ@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 29-01-16 19:35:18, Tetsuo Handa wrote: > Michal Hocko wrote: > > From: Michal Hocko > > > > zone_reclaimable_pages is used in should_reclaim_retry which uses it to > > calculate the target for the watermark check. This means that precise > > numbers are important for the correct decision. zone_reclaimable_pages > > uses zone_page_state which can contain stale data with per-cpu diffs > > not synced yet (the last vmstat_update might have run 1s in the past). > > > > Use zone_page_state_snapshot in zone_reclaimable_pages instead. None > > of the current callers is in a hot path where getting the precise value > > (which involves per-cpu iteration) would cause an unreasonable overhead. > > > > Suggested-by: David Rientjes > > Signed-off-by: Michal Hocko > > --- > > mm/vmscan.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > I didn't know http://lkml.kernel.org/r/20151021130323.GC8805@dhcp22.suse.cz > was forgotten. Anyway, OK, that explains why this sounded so familiar. Sorry I comepletely forgot about it. > Acked-by: Tetsuo Handa Can I change it to your Signed-off-by? -- Michal Hocko SUSE Labs