From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756871AbZBJWRZ (ORCPT ); Tue, 10 Feb 2009 17:17:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755509AbZBJWRQ (ORCPT ); Tue, 10 Feb 2009 17:17:16 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:48510 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755891AbZBJWRP (ORCPT ); Tue, 10 Feb 2009 17:17:15 -0500 Date: Tue, 10 Feb 2009 14:16:13 -0800 From: Andrew Morton To: Johannes Weiner Cc: riel@redhat.com, wli@movementarian.org, kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages() Message-Id: <20090210141613.276a3c9c.akpm@linux-foundation.org> In-Reply-To: <20090209222416.GA9758@cmpxchg.org> References: <20090209222416.GA9758@cmpxchg.org> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Feb 2009 23:24:16 +0100 Johannes Weiner wrote: > The commit missed to actually adjust do_try_to_free_pages() which now > does not initialize sc.nr_reclaimed and makes shrink_zone() make > assumptions on whether to bail out of the reclaim cycle based on an > uninitialized value. Both callers of do_try_to_free_pages() _do_ initialise scan_control.nr_reclaimed. The unitemised fields in a struct initaliser are reliably zeroed. We often rely upon this, and the only reason for mentioning such a field is for documentation reasons, or if you want to add a comment at the initialisation site. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 12BF56B004F for ; Tue, 10 Feb 2009 17:16:53 -0500 (EST) Date: Tue, 10 Feb 2009 14:16:13 -0800 From: Andrew Morton Subject: Re: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages() Message-Id: <20090210141613.276a3c9c.akpm@linux-foundation.org> In-Reply-To: <20090209222416.GA9758@cmpxchg.org> References: <20090209222416.GA9758@cmpxchg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Johannes Weiner Cc: riel@redhat.com, wli@movementarian.org, kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: On Mon, 9 Feb 2009 23:24:16 +0100 Johannes Weiner wrote: > The commit missed to actually adjust do_try_to_free_pages() which now > does not initialize sc.nr_reclaimed and makes shrink_zone() make > assumptions on whether to bail out of the reclaim cycle based on an > uninitialized value. Both callers of do_try_to_free_pages() _do_ initialise scan_control.nr_reclaimed. The unitemised fields in a struct initaliser are reliably zeroed. We often rely upon this, and the only reason for mentioning such a field is for documentation reasons, or if you want to add a comment at the initialisation site. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org