summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c4
-rw-r--r--block/blk.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 652a31fc3bb3..49587c181e3f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2148,14 +2148,14 @@ static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq)
}
/*
- * Allow 4x BLK_MAX_REQUEST_COUNT requests on plug queue for multiple
+ * Allow 2x BLK_MAX_REQUEST_COUNT requests on plug queue for multiple
* queues. This is important for md arrays to benefit from merging
* requests.
*/
static inline unsigned short blk_plug_max_rq_count(struct blk_plug *plug)
{
if (plug->multiple_queues)
- return BLK_MAX_REQUEST_COUNT * 4;
+ return BLK_MAX_REQUEST_COUNT * 2;
return BLK_MAX_REQUEST_COUNT;
}
diff --git a/block/blk.h b/block/blk.h
index 6c3c00a8fe19..aab72194d226 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -185,6 +185,12 @@ void blk_account_io_start(struct request *req);
void blk_account_io_done(struct request *req, u64 now);
/*
+ * Plug flush limits
+ */
+#define BLK_MAX_REQUEST_COUNT 32
+#define BLK_PLUG_FLUSH_SIZE (128 * 1024)
+
+/*
* Internal elevator interface
*/
#define ELV_ON_HASH(rq) ((rq)->rq_flags & RQF_HASHED)