Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282Ab2KLUcg (ORCPT ); Mon, 12 Nov 2012 15:32:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1519 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753037Ab2KLUce (ORCPT ); Mon, 12 Nov 2012 15:32:34 -0500 Date: Mon, 12 Nov 2012 15:32:21 -0500 From: Johannes Weiner To: Sonny Rao Cc: linux-kernel@vger.kernel.org, Fengguang Wu , Peter Zijlstra , Andrew Morton , Michal Hocko , linux-mm@kvack.org, Mandeep Singh Baines , Olof Johansson , Will Drewry , Kees Cook , Aaron Durbin , Puneet Kumar Subject: Re: [PATCH] mm: Fix calculation of dirtyable memory Message-ID: <20121112203221.GB4511@redhat.com> References: <20121109023638.GA11105@localhost> <1352748928-738-1-git-send-email-sonnyrao@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1352748928-738-1-git-send-email-sonnyrao@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1343 Lines: 31 On Mon, Nov 12, 2012 at 11:35:28AM -0800, Sonny Rao wrote: > The system uses global_dirtyable_memory() to calculate > number of dirtyable pages/pages that can be allocated > to the page cache. A bug causes an underflow thus making > the page count look like a big unsigned number. This in turn > confuses the dirty writeback throttling to aggressively write > back pages as they become dirty (usually 1 page at a time). > > Fix is to ensure there is no underflow while doing the math. > > Signed-off-by: Sonny Rao > Signed-off-by: Puneet Kumar Thanks for debugging and sending in the patch. It might be useful to note in the changelog that the crawling writeback problem only affects highmem systems because of the way the underflowed count of high memory is subtracted from the overall amount of dirtyable memory. And that the problem was introduced with v3.2-4896-gab8fabd (which means that we should include Cc: stable@kernel.org for 3.3+). The diff itself looks good to me, thanks again: Acked-by: Johannes Weiner -- 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/