Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754152AbbKYNr5 (ORCPT ); Wed, 25 Nov 2015 08:47:57 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:34115 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754131AbbKYNrz (ORCPT ); Wed, 25 Nov 2015 08:47:55 -0500 Date: Wed, 25 Nov 2015 14:47:52 +0100 From: Michal Hocko To: Vlastimil Babka Cc: Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, Christoph Lameter , linux-mm@kvack.org, Joonsoo Kim Subject: Re: [PATCH] mm/vmstat: retrieve more accurate vmstat value Message-ID: <20151125134747.GH27283@dhcp22.suse.cz> References: <1448346123-2699-1-git-send-email-iamjoonsoo.kim@lge.com> <20151125120021.GA27342@dhcp22.suse.cz> <5655BB0A.90000@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5655BB0A.90000@suse.cz> 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 Content-Length: 1199 Lines: 28 On Wed 25-11-15 14:43:38, Vlastimil Babka wrote: > On 11/25/2015 01:00 PM, Michal Hocko wrote: > > On Tue 24-11-15 15:22:03, Joonsoo Kim wrote: > >> When I tested compaction in low memory condition, I found that > >> my benchmark is stuck in congestion_wait() at shrink_inactive_list(). > >> This stuck last for 1 sec and after then it can escape. More investigation > >> shows that it is due to stale vmstat value. vmstat is updated every 1 sec > >> so it is stuck for 1 sec. > > > > Wouldn't it be sufficient to use zone_page_state_snapshot in > > too_many_isolated? > > That sounds better than the ad-hoc half-solution, yeah. > I don't know how performance sensitive the callers are, but maybe it could do a > non-snapshot check first, and only repeat with _snapshot when it's about to wait > (the result is true), just to make sure? I am not sure this is worth bothering. We are in the reclaim which is not a hot path. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/