[lkml]   [2012]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/6] buffered write IO controller in balance_dirty_pages()

Here is one possible solution to "buffered write IO controller", based on Linux

git:// buffered-write-io-controller

- support blkio.weight
- support blkio.throttle.buffered_write_bps

- it's trivial to support per-bdi .weight or .buffered_write_bps

1) simple
2) virtually no space/time overheads
3) independent of the block layer and IO schedulers, hence
3.1) supports all filesystems/storages, eg. NFS/pNFS, CIFS, sshfs, ...
3.2) supports all IO schedulers. One may use noop for SSDs, inside virtual machines, over iSCSI, etc.

1) don't try to smooth bursty IO submission in the flusher thread (*)
2) don't support IOPS based throttling
3) introduces semantic differences to blkio.weight, which will be
- working by "bandwidth" for buffered writes
- working by "device time" for direct IO

(*) Maybe not a big concern, since the bursties are limited to 500ms: if one dd
is throttled to 50% disk bandwidth, the flusher thread will be waking up on
every 1 second, keep the disk busy for 500ms and then go idle for 500ms; if
throttled to 10% disk bandwidth, the flusher thread will wake up on every 5s,
keep busy for 500ms and stay idle for 4.5s.

The test results included in the last patch look pretty good in despite of the
simple implementation.

[PATCH 1/6] blk-cgroup: move blk-cgroup.h in include/linux/blk-cgroup.h
[PATCH 2/6] blk-cgroup: account dirtied pages
[PATCH 3/6] blk-cgroup: buffered write IO controller - bandwidth weight
[PATCH 4/6] blk-cgroup: buffered write IO controller - bandwidth limit
[PATCH 5/6] blk-cgroup: buffered write IO controller - bandwidth limit interface
[PATCH 6/6] blk-cgroup: buffered write IO controller - debug trace

The changeset is dominated by the blk-cgroup.h move.
The core changes (to page-writeback.c) are merely 77 lines.

block/blk-cgroup.c | 27 +
block/blk-cgroup.h | 364 --------------------------
block/blk-throttle.c | 2
block/cfq.h | 2
include/linux/blk-cgroup.h | 396 +++++++++++++++++++++++++++++
include/trace/events/writeback.h | 34 ++
mm/page-writeback.c | 77 +++++
7 files changed, 530 insertions(+), 372 deletions(-)


 \ /
  Last update: 2012-03-28 16:25    [W:0.128 / U:37.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site