From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Righi Subject: Re: [ATTEND] [LSF/MM TOPIC] Buffered writes throttling Date: Tue, 6 Mar 2012 00:19:30 +0100 Message-ID: <20120305231930.GC7545@thinkpad> References: <4F507453.1020604@suse.com> <20120302153322.GB26315@redhat.com> <20120305192226.GA3670@localhost> <20120305211114.GF18546@redhat.com> <20120305223029.GB16807@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Vivek Goyal , Suresh Jayaraman , lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Jan Kara , Greg Thelen To: Fengguang Wu Return-path: Received: from mail.betterlinux.com ([199.58.199.50]:55312 "EHLO mail.betterlinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757621Ab2CEXTe (ORCPT ); Mon, 5 Mar 2012 18:19:34 -0500 Content-Disposition: inline In-Reply-To: <20120305223029.GB16807@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Mar 05, 2012 at 02:30:29PM -0800, Fengguang Wu wrote: > On Mon, Mar 05, 2012 at 04:11:15PM -0500, Vivek Goyal wrote: ... > > But looks like we don't much choice. As buffered writes can be controlled > > at two levels, we probably need two knobs. Also controlling writes while > > entring cache limits will be global and not per device (unlinke currnet > > per device limit in blkio controller). Having separate control for "dirty > > rate limit" leaves the scope for implementing write control at device > > level in the future (As some people prefer that). In possibly two > > solutions can co-exist in future. > > Good point. balance_dirty_pages() has no idea about the devices at > all. So the rate limit for buffered writes can hardly be unified with > the per-device rate limit for direct writes. > I think balance_dirty_pages() can have an idea about devices. We can get a reference to the right block device / request queue from the address_space: bdev = mapping->host->i_sb->s_bdev; q = bdev_get_queue(bdev); (NULL pointer dereferences apart). -Andrea