Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051AbcD0A5Z (ORCPT ); Tue, 26 Apr 2016 20:57:25 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:50065 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbcD0A5W (ORCPT ); Tue, 26 Apr 2016 20:57:22 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Wed, 27 Apr 2016 09:57:18 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Hugh Dickins , Rik van Riel , stable@vger.kernel.org Subject: Re: [PATCH 4.6 1/3] mm, cma: prevent nr_isolated_* counters from going negative Message-ID: <20160427005718.GB6336@js1304-P5Q-DELUXE> References: <1461591269-28615-1-git-send-email-vbabka@suse.cz> <1461591350-28700-1-git-send-email-vbabka@suse.cz> <1461591350-28700-2-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461591350-28700-2-git-send-email-vbabka@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1240 Lines: 26 On Mon, Apr 25, 2016 at 03:35:48PM +0200, Vlastimil Babka wrote: > From: Hugh Dickins > > /proc/sys/vm/stat_refresh warns nr_isolated_anon and nr_isolated_file > go increasingly negative under compaction: which would add delay when > should be none, or no delay when should delay. The bug in compaction was > due to a recent mmotm patch, but much older instance of the bug was also > noticed in isolate_migratepages_range() which is used for CMA and > gigantic hugepage allocations. > > The bug is caused by putback_movable_pages() in an error path decrementing > the isolated counters without them being previously incremented by > acct_isolated(). Fix isolate_migratepages_range() by removing the error-path > putback, thus reaching acct_isolated() with migratepages still isolated, and > leaving putback to caller like most other places do. > > [vbabka@suse.cz: expanded the changelog] > Fixes: edc2ca612496 ("mm, compaction: move pageblock checks up from isolate_migratepages_range()") > Cc: stable@vger.kernel.org > Cc: Joonsoo Kim > Signed-off-by: Hugh Dickins > Signed-off-by: Vlastimil Babka Acked-by: Joonsoo Kim Thanks.