From: Fengguang Wu <fengguang.wu@intel.com>
To: Linux Memory Management List <linux-mm@kvack.org>
Cc: Vivek Goyal <vgoyal@redhat.com>, Wu Fengguang <fengguang.wu@intel.com>
Cc: Suresh Jayaraman <sjayaraman@suse.com>,
Andrea Righi <andrea@betterlinux.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 5/6] blk-cgroup: buffered write IO controller - bandwidth limit interface
Date: Wed, 28 Mar 2012 20:13:13 +0800 [thread overview]
Message-ID: <20120328131153.475460374@intel.com> (raw)
In-Reply-To: 20120328121308.568545879@intel.com
[-- Attachment #1: writeback-io-controller-interface.patch --]
[-- Type: text/plain, Size: 2102 bytes --]
Add blkio controller interface "throttle.buffered_write_bps".
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
block/blk-cgroup.c | 21 +++++++++++++++++++++
include/linux/blk-cgroup.h | 1 +
2 files changed, 22 insertions(+)
--- linux-next.orig/block/blk-cgroup.c 2012-03-28 15:36:16.402093131 +0800
+++ linux-next/block/blk-cgroup.c 2012-03-28 15:36:44.974092545 +0800
@@ -1355,6 +1355,12 @@ static u64 blkiocg_file_read_u64 (struct
return (u64)blkcg->weight;
}
break;
+ case BLKIO_POLICY_THROTL:
+ switch (name) {
+ case BLKIO_THROTL_buffered_write_bps:
+ return (u64)blkcg->buffered_write_bps;
+ }
+ break;
default:
BUG();
}
@@ -1377,6 +1383,13 @@ blkiocg_file_write_u64(struct cgroup *cg
return blkio_weight_write(blkcg, val);
}
break;
+ case BLKIO_POLICY_THROTL:
+ switch (name) {
+ case BLKIO_THROTL_buffered_write_bps:
+ blkcg->buffered_write_bps = val;
+ return 0;
+ }
+ break;
default:
BUG();
}
@@ -1500,6 +1513,14 @@ struct cftype blkio_files[] = {
BLKIO_THROTL_io_serviced),
.read_map = blkiocg_file_read_map,
},
+ {
+ .name = "throttle.buffered_write_bps",
+ .private = BLKIOFILE_PRIVATE(BLKIO_POLICY_THROTL,
+ BLKIO_THROTL_buffered_write_bps),
+ .read_u64 = blkiocg_file_read_u64,
+ .write_u64 = blkiocg_file_write_u64,
+ .max_write_len = 256,
+ },
#endif /* CONFIG_BLK_DEV_THROTTLING */
#ifdef CONFIG_DEBUG_BLK_CGROUP
--- linux-next.orig/include/linux/blk-cgroup.h 2012-03-28 15:36:16.426093131 +0800
+++ linux-next/include/linux/blk-cgroup.h 2012-03-28 15:36:44.974092545 +0800
@@ -113,6 +113,7 @@ enum blkcg_file_name_throtl {
BLKIO_THROTL_write_iops_device,
BLKIO_THROTL_io_service_bytes,
BLKIO_THROTL_io_serviced,
+ BLKIO_THROTL_buffered_write_bps,
};
struct blkio_cgroup {
--
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>
next prev parent reply other threads:[~2012-03-28 12:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 12:13 [PATCH 0/6] buffered write IO controller in balance_dirty_pages() Fengguang Wu
2012-03-28 12:13 ` [PATCH 1/6] blk-cgroup: move blk-cgroup.h in include/linux/blk-cgroup.h Fengguang Wu
2012-03-28 12:13 ` [PATCH 2/6] blk-cgroup: account dirtied pages Fengguang Wu
2012-03-28 12:13 ` [PATCH 3/6] blk-cgroup: buffered write IO controller - bandwidth weight Fengguang Wu
2012-03-28 12:13 ` [PATCH 4/6] blk-cgroup: buffered write IO controller - bandwidth limit Fengguang Wu
2012-03-28 12:13 ` Fengguang Wu [this message]
2012-03-28 12:13 ` [PATCH 6/6] blk-cgroup: buffered write IO controller - debug trace Fengguang Wu
2012-03-28 21:10 ` [PATCH 0/6] buffered write IO controller in balance_dirty_pages() Vivek Goyal
2012-03-28 22:35 ` Fengguang Wu
2012-03-29 2:48 ` Suresh Jayaraman
2012-03-29 0:34 ` KAMEZAWA Hiroyuki
2012-03-29 1:22 ` Fengguang Wu
2012-04-01 4:16 ` Suresh Jayaraman
2012-04-01 8:30 ` Fengguang Wu
2012-04-01 20:56 ` Vivek Goyal
2012-04-03 8:00 ` Fengguang Wu
2012-04-03 14:53 ` Vivek Goyal
2012-04-03 23:32 ` 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=20120328131153.475460374@intel.com \
--to=fengguang.wu@intel.com \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).