From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614Ab1HISfe (ORCPT ); Tue, 9 Aug 2011 14:35:34 -0400 Received: from casper.infradead.org ([85.118.1.10]:50398 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780Ab1HISfd convert rfc822-to-8bit (ORCPT ); Tue, 9 Aug 2011 14:35:33 -0400 Subject: Re: [PATCH 4/5] writeback: per task dirty rate limit From: Peter Zijlstra To: Wu Fengguang Cc: linux-fsdevel@vger.kernel.org, Andrew Morton , Jan Kara , Christoph Hellwig , Dave Chinner , Greg Thelen , Minchan Kim , Vivek Goyal , Andrea Righi , linux-mm , LKML Date: Tue, 09 Aug 2011 20:35:06 +0200 In-Reply-To: <20110806094527.002914580@intel.com> References: <20110806084447.388624428@intel.com> <20110806094527.002914580@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.0.2- Message-ID: <1312914906.1083.71.camel@twins> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2011-08-06 at 16:44 +0800, Wu Fengguang wrote: > > Add two fields to task_struct. > > 1) account dirtied pages in the individual tasks, for accuracy > 2) per-task balance_dirty_pages() call intervals, for flexibility > > The balance_dirty_pages() call interval (ie. nr_dirtied_pause) will > scale near-sqrt to the safety gap between dirty pages and threshold. > > XXX: The main problem of per-task nr_dirtied is, if 10k tasks start > dirtying pages at exactly the same time, each task will be assigned a > large initial nr_dirtied_pause, so that the dirty threshold will be > exceeded long before each task reached its nr_dirtied_pause and hence > call balance_dirty_pages(). Right, so why remove the per-cpu threshold? you can keep that as a bound on the number of out-standing dirty pages. Loosing that bound is actually a bad thing (TM), since you could have configured a tight dirty limit and lock up your machine this way. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 4/5] writeback: per task dirty rate limit Date: Tue, 09 Aug 2011 20:35:06 +0200 Message-ID: <1312914906.1083.71.camel@twins> References: <20110806084447.388624428@intel.com> <20110806094527.002914580@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: linux-fsdevel@vger.kernel.org, Andrew Morton , Jan Kara , Christoph Hellwig , Dave Chinner , Greg Thelen , Minchan Kim , Vivek Goyal , Andrea Righi , linux-mm , LKML To: Wu Fengguang Return-path: In-Reply-To: <20110806094527.002914580@intel.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Sat, 2011-08-06 at 16:44 +0800, Wu Fengguang wrote: >=20 > Add two fields to task_struct. >=20 > 1) account dirtied pages in the individual tasks, for accuracy > 2) per-task balance_dirty_pages() call intervals, for flexibility >=20 > The balance_dirty_pages() call interval (ie. nr_dirtied_pause) will > scale near-sqrt to the safety gap between dirty pages and threshold. >=20 > XXX: The main problem of per-task nr_dirtied is, if 10k tasks start > dirtying pages at exactly the same time, each task will be assigned a > large initial nr_dirtied_pause, so that the dirty threshold will be > exceeded long before each task reached its nr_dirtied_pause and hence > call balance_dirty_pages().=20 Right, so why remove the per-cpu threshold? you can keep that as a bound on the number of out-standing dirty pages. Loosing that bound is actually a bad thing (TM), since you could have configured a tight dirty limit and lock up your machine this way. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 47F596B0169 for ; Tue, 9 Aug 2011 14:35:31 -0400 (EDT) Subject: Re: [PATCH 4/5] writeback: per task dirty rate limit From: Peter Zijlstra Date: Tue, 09 Aug 2011 20:35:06 +0200 In-Reply-To: <20110806094527.002914580@intel.com> References: <20110806084447.388624428@intel.com> <20110806094527.002914580@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID: <1312914906.1083.71.camel@twins> Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Wu Fengguang Cc: linux-fsdevel@vger.kernel.org, Andrew Morton , Jan Kara , Christoph Hellwig , Dave Chinner , Greg Thelen , Minchan Kim , Vivek Goyal , Andrea Righi , linux-mm , LKML On Sat, 2011-08-06 at 16:44 +0800, Wu Fengguang wrote: >=20 > Add two fields to task_struct. >=20 > 1) account dirtied pages in the individual tasks, for accuracy > 2) per-task balance_dirty_pages() call intervals, for flexibility >=20 > The balance_dirty_pages() call interval (ie. nr_dirtied_pause) will > scale near-sqrt to the safety gap between dirty pages and threshold. >=20 > XXX: The main problem of per-task nr_dirtied is, if 10k tasks start > dirtying pages at exactly the same time, each task will be assigned a > large initial nr_dirtied_pause, so that the dirty threshold will be > exceeded long before each task reached its nr_dirtied_pause and hence > call balance_dirty_pages().=20 Right, so why remove the per-cpu threshold? you can keep that as a bound on the number of out-standing dirty pages. Loosing that bound is actually a bad thing (TM), since you could have configured a tight dirty limit and lock up your machine this way. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org