All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <andrea@betterlinux.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	Suresh Jayaraman <sjayaraman@suse.com>,
	lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Greg Thelen <gthelen@google.com>
Subject: Re: [ATTEND] [LSF/MM TOPIC] Buffered writes throttling
Date: Tue, 6 Mar 2012 00:19:30 +0100	[thread overview]
Message-ID: <20120305231930.GC7545@thinkpad> (raw)
In-Reply-To: <20120305223029.GB16807@localhost>

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

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Righi <andrea@betterlinux.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>,
	Suresh Jayaraman <sjayaraman@suse.com>,
	lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Greg Thelen <gthelen@google.com>
Subject: Re: [ATTEND] [LSF/MM TOPIC] Buffered writes throttling
Date: Tue, 6 Mar 2012 00:19:30 +0100	[thread overview]
Message-ID: <20120305231930.GC7545@thinkpad> (raw)
In-Reply-To: <20120305223029.GB16807@localhost>

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

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-03-05 23:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02  7:18 [ATTEND] [LSF/MM TOPIC] Buffered writes throttling Suresh Jayaraman
2012-03-02 15:33 ` Vivek Goyal
2012-03-05 19:22   ` Fengguang Wu
2012-03-05 19:22     ` Fengguang Wu
2012-03-05 21:11     ` Vivek Goyal
2012-03-05 22:30       ` Fengguang Wu
2012-03-05 22:30         ` Fengguang Wu
2012-03-05 23:19         ` Andrea Righi [this message]
2012-03-05 23:19           ` Andrea Righi
2012-03-05 23:51           ` Fengguang Wu
2012-03-05 23:51             ` Fengguang Wu
2012-03-06  0:46             ` Andrea Righi
2012-03-06  0:46               ` Andrea Righi
2012-03-07 20:26               ` Vivek Goyal
2012-03-05 22:58       ` Andrea Righi
2012-03-05 22:58         ` Andrea Righi
2012-03-07 20:52         ` Vivek Goyal
2012-03-07 22:04           ` Jeff Moyer
2012-03-08  8:08           ` Greg Thelen
2012-03-05 20:23   ` [Lsf-pc] " Jan Kara
2012-03-05 20:23     ` Jan Kara
2012-03-05 21:41     ` Vivek Goyal
2012-03-07 17:24       ` Jan Kara
2012-03-07 21:29         ` Vivek Goyal
2012-03-05 22:18     ` Vivek Goyal
2012-03-05 22:36       ` Jan Kara
2012-03-07  6:42         ` Fengguang Wu
2012-03-07  6:42           ` Fengguang Wu
2012-03-07  6:31     ` Fengguang Wu
2012-03-07  6:31       ` Fengguang Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120305231930.GC7545@thinkpad \
    --to=andrea@betterlinux.com \
    --cc=fengguang.wu@intel.com \
    --cc=gthelen@google.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=sjayaraman@suse.com \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.