summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-03-27 15:19:42 -0700
committerJens Axboe <axboe@fb.com>2017-03-28 08:02:20 -0600
commitb9147dd1bae2b15d6931ecd42f8606c775fecbc9 (patch)
tree9becbcfbf24e535538680bb53f38962808b4e28e /block/blk.h
parent88eeca495ba7de749ff253376ec6be19bb05368d (diff)
blk-throttle: add a mechanism to estimate IO latency
User configures latency target, but the latency threshold for each request size isn't fixed. For a SSD, the IO latency highly depends on request size. To calculate latency threshold, we sample some data, eg, average latency for request size 4k, 8k, 16k, 32k .. 1M. The latency threshold of each request size will be the sample latency (I'll call it base latency) plus latency target. For example, the base latency for request size 4k is 80us and user configures latency target 60us. The 4k latency threshold will be 80 + 60 = 140us. To sample data, we calculate the order base 2 of rounded up IO sectors. If the IO size is bigger than 1M, it will be accounted as 1M. Since the calculation does round up, the base latency will be slightly smaller than actual value. Also if there isn't any IO dispatched for a specific IO size, we will use the base latency of smaller IO size for this IO size. But we shouldn't sample data at any time. The base latency is supposed to be latency where disk isn't congested, because we use latency threshold to schedule IOs between cgroups. If disk is congested, the latency is higher, using it for scheduling is meaningless. Hence we only do the sampling when block throttling is in the LOW limit, with assumption disk isn't congested in such state. If the assumption isn't true, eg, low limit is too high, calculated latency threshold will be higher. Hard disk is completely different. Latency depends on spindle seek instead of request size. Currently this feature is SSD only, we probably can use a fixed threshold like 4ms for hard disk though. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index 3ac833ec2adb..07d375183f31 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -331,8 +331,10 @@ extern ssize_t blk_throtl_sample_time_show(struct request_queue *q, char *page);
extern ssize_t blk_throtl_sample_time_store(struct request_queue *q,
const char *page, size_t count);
extern void blk_throtl_bio_endio(struct bio *bio);
+extern void blk_throtl_stat_add(struct request *rq, u64 time);
#else
static inline void blk_throtl_bio_endio(struct bio *bio) { }
+static inline void blk_throtl_stat_add(struct request *rq, u64 time) { }
#endif
#endif /* BLK_INTERNAL_H */
ce-4-3 Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Expand)AuthorFilesLines
2014-10-19another update before 4.4.0.0alpha1Christian Lohmaier49-601/+590
2014-10-17update translations for 4.4.0.0alpha1Christian Lohmaier11212-412893/+415895
2014-08-28mass-correct XML structure: second passLionel Elie Mamane4-4/+4
2014-08-28mass-correct XML structureLionel Elie Mamane19-84/+84
2014-08-28correct HTML strucutreLionel Elie Mamane1-1/+1
2014-07-16Updates Serbian po filesAndras Timar621-96060/+120630
2014-05-22Updated Slovenian translationAndras Timar57-287/+461
2014-05-21update translations for 4.3.0 beta1libreoffice-4-3-branch-pointChristian Lohmaier12986-2113042/+2540368
2014-05-18Updated Slovenian translationAndras Timar161-22810/+30072
2014-04-20update translations for 4.3.0 alpha1Christian Lohmaier7463-348987/+884770
2013-12-09update translations for 4.2.0 Beta2Christian Lohmaier12941-2727950/+2678643
2013-12-09updated Slovenian translationAndras Timar36-248/+661
2013-12-09updated Slovenian translationAndras Timar13-80/+46
2013-12-09updated Slovenian translationAndras Timar352-1457/+2281
2013-11-27Resolves: rhbz#1035092 no shortcut key for Italian 'Tools' menuCaolán McNamara1-1/+1
2013-11-21sync with po-templates for 4.2libreoffice-4-2-branch-pointChristian Lohmaier21990-1056423/+1547142
2013-11-18renamed ku* to kmr-Latn*, fdo#63460Eike Rathke309-0/+0
2013-11-18updated Slovenian translationAndras Timar77-1277/+2390
2013-11-17remove Android Impress Remote translationsAndras Timar113-52802/+0
2013-11-17Bugzilla Migration: Change bugs.freedesktop.org -> bugs.libreoffice.orgRobinson Tryon1-1/+1
2013-11-15updated Slovenian translationAndras Timar136-27719/+32461
2013-10-08rbhz#1015004 fix caseDavid Tardon1-1/+1
2013-09-10renamed 'sh' to 'sr-Latn'Eike Rathke309-0/+0
2013-09-04renamed translations/source/ca-XV to translations/sourcei/ca-valenciaEike Rathke363-0/+0
2013-08-28Resolves: rhbz#1000692 mistranslation in de if opening Format->AbsatzCaolán McNamara1-1/+1
2013-07-25fdo#67093 Change traduction of Header in it to avoid conflict with HeadingArnaud Versini1-1/+1
2013-07-22fdo#67093 Change traduction of Title for some more languagesChristian Lohmaier13-13/+13
2013-07-20fdo#67093 Change traduction of Title in french to avoid conflict with Heading.Arnaud Versini1-1/+1
2013-06-27sync libreoffice-4-1 and masterAndras Timar6-20/+110
2013-06-27invalid xmlAndras Timar1-1/+1
2013-06-27update Sidama translationAndras Timar306-22257/+25925
2013-06-27buildfixAndras Timar1-1/+1
2013-06-27update translations for LibreOffice 4.1 rc1Andras Timar3938-72954/+79793
2013-06-27updated Slovenian translationAndras Timar21-58/+186
2013-06-15typo/help l10n extraction errorAndras Timar57-121/+121
2013-06-13parser error : EntityRef: expectingCaolán McNamara1-4/+4
2013-06-12fdo#65512 fix missing imagesAndras Timar342-973/+973
2013-06-12updated Slovenian translationAndras Timar32-289/+193
2013-06-12missing | cause Windows installer error 2870Andras Timar10-22/+22
2013-06-11fdo#65214 missing | cause Windows installer error 2870Andras Timar1-1/+1
2013-06-11fdo#65483 fix po filesAndras Timar614-139655/+6394
2013-06-05update translations for LibreOffice 4.1 beta2Andras Timar351-3667/+4053
2013-06-05update translations for LibreOffice 4.1 beta2Andras Timar