From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: Re: [PATCH 3/7] writeback: introduce smoothed global dirty limit Date: Sun, 19 Jun 2011 23:55:47 +0800 Message-ID: <20110619155546.GA14338@localhost> References: <20110619150108.691351746@intel.com> <20110619150510.246140117@intel.com> <20110619153636.GC20424@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linux-fsdevel@vger.kernel.org" , Jan Kara , Dave Chinner , Andrew Morton , LKML To: Christoph Hellwig Return-path: Received: from mga09.intel.com ([134.134.136.24]:44142 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754055Ab1FSPzu (ORCPT ); Sun, 19 Jun 2011 11:55:50 -0400 Content-Disposition: inline In-Reply-To: <20110619153636.GC20424@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Jun 19, 2011 at 11:36:37PM +0800, Christoph Hellwig wrote: > On Sun, Jun 19, 2011 at 11:01:11PM +0800, Wu Fengguang wrote: > > The start of a heavy weight application (ie. KVM) may instantly knock > > down determine_dirtyable_memory() and hence the global/bdi dirty > > thresholds. > > > > So introduce global_dirty_limit for tracking the global dirty threshold > > with policies > > > > - follow downwards slowly > > - follow up in one shot > > > > global_dirty_limit can effectively mask out the impact of sudden drop of > > dirtyable memory. It will be used in the next patch for two new type of > > dirty limits. > > This needs to be explained in more detail in comments near the actual > code. Good point! This is the added comment for the update_dirty_limit() function. /* * The global dirtyable memory and dirty threshold could be suddenly knocked * down by a large amount (eg. on the startup of KVM). This may throw the * system into deep dirty exceeded state and throttled to "death" for a couple * of seconds. The solution is to maintain global_dirty_limit for tracking * slowly down to the knocked down dirty threshold. */ static void update_dirty_limit(unsigned long thresh, unsigned long dirty) Thanks, Fengguang