Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756075AbZKIP0d (ORCPT ); Mon, 9 Nov 2009 10:26:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755969AbZKIP0d (ORCPT ); Mon, 9 Nov 2009 10:26:33 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:50093 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755057AbZKIP0c (ORCPT ); Mon, 9 Nov 2009 10:26:32 -0500 Subject: Re: Likley stupid question on "throttle_vm_writeout" From: Peter Zijlstra To: Martin Knoblauch Cc: linux-kernel@vger.kernel.org, Fengguang Wu In-Reply-To: <799070.68490.qm@web32608.mail.mud.yahoo.com> References: <799070.68490.qm@web32608.mail.mud.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 09 Nov 2009 16:26:33 +0100 Message-ID: <1257780393.4108.343.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 25 On Mon, 2009-11-09 at 07:15 -0800, Martin Knoblauch wrote: > Hi, (please CC me on replies) > > I have a likely stupid question on the function "throttle_vm_writeout". Looking at the code I find: > > if (global_page_state(NR_UNSTABLE_NFS) + > global_page_state(NR_WRITEBACK) <= dirty_thresh) > break; > congestion_wait(WRITE, HZ/10); > > Shouldn't the NR_FILE_DIRTY pages be considered as well? Ha, you just trod onto a piece of ugly I'd totally forgotten about ;-) The intent of throttle_vm_writeout() is to limit the total pages in writeout and to wait for them to go-away. Everybody hates the function, nobody managed to actually come up with anything better. -- 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/