Changheun Lee
9458fa0dda
BACKPORT: bio: limit bio max size
...
bio size can grow up to 4GB when muli-page bvec is enabled.
but sometimes it would lead to inefficient behaviors.
in case of large chunk direct I/O, - 32MB chunk read in user space -
all pages for 32MB would be merged to a bio structure if the pages
physical addresses are contiguous. it makes some delay to submit
until merge complete. bio max size should be limited to a proper size.
When 32MB chunk read with direct I/O option is coming from userspace,
kernel behavior is below now in do_direct_IO() loop. it's timeline.
| bio merge for 32MB. total 8,192 pages are merged.
| total elapsed time is over 2ms.
|------------------ ... ----------------------->|
| 8,192 pages merged a bio.
| at this time, first bio submit is done.
| 1 bio is split to 32 read request and issue.
|--------------->
|--------------->
|--------------->
......
|--------------->
|--------------->|
total 19ms elapsed to complete 32MB read done from device. |
If bio max size is limited with 1MB, behavior is changed below.
| bio merge for 1MB. 256 pages are merged for each bio.
| total 32 bio will be made.
| total elapsed time is over 2ms. it's same.
| but, first bio submit timing is fast. about 100us.
|--->|--->|--->|---> ... -->|--->|--->|--->|--->|
| 256 pages merged a bio.
| at this time, first bio submit is done.
| and 1 read request is issued for 1 bio.
|--------------->
|--------------->
|--------------->
......
|--------------->
|--------------->|
total 17ms elapsed to complete 32MB read done from device. |
As a result, read request issue timing is faster if bio max size is limited.
Current kernel behavior with multipage bvec, super large bio can be created.
And it lead to delay first I/O request issue.
Signed-off-by: Changheun Lee <nanich.lee@samsung.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20210503095203.29076-1-nanich.lee@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk >
Bug: 182716953
(cherry picked from commit cd2c7545ae )
Change-Id: Ie3876daa495535dc7f856ed9a281e65d72a437c1
Signed-off-by: Bart Van Assche <bvanassche@google.com >
2021-05-07 07:14:07 -07:00
..
2021-03-01 12:52:06 -08:00
2021-04-14 08:42:06 +02:00
2021-04-09 21:09:05 -07:00
2021-03-24 20:43:25 +00:00
2020-10-29 17:22:59 -05:00
2021-04-07 15:00:11 +02:00
2021-03-17 17:06:17 +01:00
2020-12-30 11:54:19 +01:00
2021-01-28 17:57:10 +00:00
2020-10-29 17:22:59 -05:00
2021-03-04 11:38:07 +01:00
2021-04-14 08:42:11 +02:00
2021-03-16 21:57:16 +00:00
2020-10-25 14:51:49 -07:00
2021-04-02 15:25:50 +02:00
2021-04-21 13:00:56 +02:00
2021-04-21 13:00:55 +02:00
2021-04-28 13:39:59 +02:00
2021-03-25 17:15:27 +01:00
2021-04-23 18:42:38 -07:00
2020-10-24 10:39:22 -07:00
2021-03-04 11:38:14 +01:00
2020-11-12 15:05:34 +00:00
2021-02-13 13:55:12 +01:00
2021-04-15 06:43:10 +00:00
2021-03-09 11:11:13 +01:00
2021-04-09 09:29:17 +02:00
2021-05-07 07:12:41 -07:00
2021-03-15 07:47:37 +00:00
2021-01-27 09:43:35 +00:00
2021-02-05 11:03:56 +00:00
2020-10-29 16:51:28 +00:00
2021-02-05 17:37:33 +00:00
2021-05-07 07:14:07 -07:00
2021-03-18 16:03:05 +01:00
2020-10-24 17:29:43 +02:00
2021-01-12 20:18:17 +01:00
2021-05-07 07:14:07 -07:00
2020-11-19 08:55:44 -05:00
2021-04-28 13:40:00 +02:00
2020-10-22 09:59:21 -07:00
2021-04-29 13:57:47 +02:00
2021-04-09 21:09:04 -07:00
2021-03-23 04:05:31 +00:00
2020-12-11 14:02:14 -08:00
2020-10-25 14:51:49 -07:00
2021-01-14 16:28:57 +00:00
2021-02-11 12:29:55 +00:00
2021-02-11 14:41:53 +00:00
2021-01-25 12:21:02 -08:00
2021-04-21 23:59:41 +00:00
2020-11-02 09:27:42 +01:00
2020-10-25 14:51:49 -07:00
2021-01-14 16:29:15 +00:00
2021-03-19 09:42:56 +01:00
2021-01-19 18:27:21 +01:00
2020-11-14 11:26:03 -08:00
2021-03-01 12:52:12 -08:00
2021-03-01 12:52:16 -08:00
2020-12-08 19:08:52 +00:00
2020-11-13 08:26:07 +01:00
2021-03-11 16:16:38 +00:00
2021-02-05 09:20:53 +00:00
2021-03-09 11:11:13 +01:00
2020-10-19 14:28:30 -07:00
2020-11-06 18:49:04 +00:00
2020-10-30 08:37:39 +01:00
2021-04-02 15:25:50 +02:00
2021-03-24 20:43:25 +00:00
2021-01-19 18:27:22 +01:00
2021-03-09 03:44:12 +00:00
2021-04-07 14:17:51 +00:00
2021-02-10 19:42:19 +00:00
2021-03-18 16:08:25 +01:00
2021-01-13 18:27:04 +00:00
2021-04-23 18:42:37 -07:00
2021-03-11 16:16:38 +00:00
2020-10-25 14:51:49 -07:00
2021-03-11 14:17:27 +01:00
2021-03-25 09:04:18 +01:00
2020-12-11 14:02:14 -08:00
2021-03-02 17:34:28 -08:00
2021-03-17 17:06:36 +01:00
2021-03-18 16:09:29 +01:00
2021-03-04 11:38:41 +01:00
2021-04-23 18:42:37 -07:00
2021-04-07 15:00:11 +02:00
2021-01-26 23:05:55 -08:00
2021-03-04 11:37:22 +01:00
2020-10-25 14:51:49 -07:00
2021-03-01 19:06:56 -08:00
2021-02-26 05:46:24 +00:00
2020-12-30 11:54:18 +01:00
2020-11-24 16:16:54 +00:00
2021-03-01 19:06:56 -08:00
2021-03-24 20:43:25 +00:00
2021-03-18 16:09:52 +01:00
2020-12-01 18:07:54 +00:00
2020-12-01 18:05:53 +00:00
2020-10-22 22:44:35 +02:00
2021-04-16 11:43:20 +02:00
2021-03-18 16:10:11 +01:00
2021-03-30 14:31:54 +02:00
2021-01-22 18:01:16 +00:00
2021-04-09 15:35:59 -07:00
2021-03-04 11:38:46 +01:00
2021-03-30 14:31:57 +02:00
2020-10-25 14:51:49 -07:00
2021-01-14 16:29:15 +00:00
2021-01-12 20:18:24 +01:00
2020-11-10 19:07:11 +00:00
2020-11-04 10:22:56 -07:00
2021-04-09 21:09:05 -07:00
2020-10-20 07:10:14 -06:00
2021-03-18 16:17:14 +01:00
2021-04-09 21:09:06 -07:00
2021-03-18 16:17:31 +01:00
2021-03-18 16:04:29 +01:00
2021-02-10 09:29:17 +01:00
2021-03-18 16:17:47 +01:00
2020-11-19 22:38:29 -05:00
2020-10-29 13:17:58 -05:00
2021-02-07 13:41:42 -08:00
2021-04-25 14:59:34 +02:00
2021-01-09 13:46:23 +01:00
2020-10-25 14:51:49 -07:00
2021-03-18 16:18:05 +01:00
2021-03-04 11:37:50 +01:00
2021-03-04 11:37:59 +01:00
2021-02-23 08:10:56 +01:00
2021-02-05 09:20:54 -08:00
2021-03-04 11:38:46 +01:00
2021-03-04 11:38:20 +01:00
2021-03-18 16:18:19 +01:00
2021-02-10 09:29:16 +01:00
2021-02-07 15:37:17 +01:00
2020-10-23 03:42:13 -04:00
2021-02-03 23:28:40 +01:00
2021-01-11 16:43:50 +00:00
2021-02-05 11:03:49 +00:00
2021-02-05 11:03:49 +00:00
2021-04-21 13:01:00 +02:00
2021-03-30 14:31:47 +02:00
2021-01-12 18:23:34 +00:00
2021-03-17 17:06:25 +01:00
2021-03-04 11:38:21 +01:00
2021-03-23 04:05:24 +00:00
2021-04-02 15:25:50 +02:00
2021-05-03 12:08:04 -07:00
2021-02-05 09:20:52 +00:00
2021-04-02 15:25:50 +02:00
2021-04-20 21:26:32 +00:00
2021-03-22 15:05:55 +00:00
2021-01-19 21:47:30 -08:00
2020-10-25 14:51:49 -07:00
2021-03-23 08:00:57 +01:00
2021-02-10 09:29:17 +01:00
2021-03-30 14:32:07 +02:00
2021-03-18 16:04:29 +01:00
2021-04-09 21:09:05 -07:00
2020-10-30 12:57:39 +01:00
2020-10-30 12:57:39 +01:00
2020-10-21 18:24:08 -07:00
2020-11-30 10:52:22 -05:00
2020-10-21 10:31:20 -04:00
2020-11-22 10:48:22 -08:00
2021-02-07 15:37:16 +01:00
2020-10-25 14:51:49 -07:00
2021-02-25 15:16:39 -08:00
2021-03-11 19:35:01 +01:00
2021-01-08 17:03:42 +00:00
2021-04-03 14:11:30 +00:00
2021-04-30 09:13:34 -07:00
2021-04-01 00:09:00 +00:00
2021-04-30 09:13:34 -07:00
2021-01-19 21:47:30 -08:00
2021-04-02 15:25:50 +02:00
2021-03-18 16:02:34 +01:00
2020-10-25 14:51:49 -07:00
2021-03-17 17:06:34 +01:00
2020-11-09 18:12:34 +01:00
2021-03-17 17:06:28 +01:00
2021-04-09 21:09:03 -07:00
2020-10-18 09:27:10 -07:00
2021-04-23 18:42:36 -07:00
2020-11-16 09:37:01 -08:00
2021-03-24 15:09:17 -07:00
2021-04-14 17:36:16 +00:00
2020-10-24 20:21:57 +02:00
2020-10-25 14:51:49 -07:00
2020-12-30 11:53:56 +01:00
2021-01-21 18:04:03 -08:00
2021-01-28 17:57:12 +00:00
2021-04-07 15:00:13 +02:00
2021-03-18 16:20:07 +01:00
2021-03-04 11:38:35 +01:00
2020-10-28 11:41:15 -06:00
2021-05-07 07:12:41 -07:00
2021-03-07 12:33:33 +01:00
2021-01-13 10:28:55 +01:00
2021-03-22 15:06:24 +00:00
2021-03-02 17:34:35 -08:00
2021-01-07 17:56:54 -08:00
2021-02-05 11:03:49 +00:00
2020-12-30 11:53:42 +01:00
2020-11-06 10:05:18 -08:00
2021-03-17 17:06:34 +01:00
2020-10-25 14:51:49 -07:00
2021-04-09 15:36:00 -07:00
2021-01-22 10:05:52 -08:00
2021-01-22 10:05:52 -08:00
2021-03-18 16:04:29 +01:00
2021-04-14 08:42:01 +02:00
2021-02-05 09:20:53 -08:00
2020-10-25 11:39:02 -07:00
2021-02-05 09:20:53 -08:00
2020-10-25 14:51:49 -07:00
2020-10-22 14:15:51 -06:00
2021-02-15 15:11:44 -08:00
2021-03-30 14:31:53 +02:00
2021-03-30 14:31:53 +02:00
2020-12-08 14:52:29 -08:00
2021-03-19 09:42:56 +01:00
2021-01-19 21:47:30 -08:00
2020-10-24 17:29:43 +02:00
2021-03-23 04:05:15 +00:00
2020-11-16 14:58:23 -08:00
2021-01-17 14:16:59 +01:00
2020-10-17 15:05:30 -06:00
2020-11-27 16:50:51 +00:00
2021-03-25 09:04:16 +01:00
2020-10-26 11:48:11 +01:00
2021-03-18 16:20:25 +01:00
2021-03-04 11:38:29 +01:00
2020-10-25 14:51:49 -07:00
2020-12-30 11:53:42 +01:00
2021-02-10 09:29:16 +01:00
2021-03-04 11:37:36 +01:00
2021-01-27 11:55:30 +01:00
2021-03-30 14:31:51 +02:00
2020-10-28 15:08:39 +01:00
2021-02-17 11:02:28 +01:00
2021-03-11 16:02:50 +00:00
2021-03-25 09:04:14 +01:00
2021-03-17 17:06:19 +01:00
2021-03-18 16:20:44 +01:00
2021-04-09 15:35:59 -07:00
2021-03-30 14:32:03 +02:00
2020-10-23 11:55:27 -04:00
2020-10-23 11:00:57 -07:00
2021-04-14 08:42:01 +02:00
2021-02-01 19:32:29 +00:00
2021-04-23 18:42:39 -07:00
2021-02-10 09:29:21 +01:00
2021-04-07 15:00:06 +02:00
2020-10-20 14:39:37 -07:00
2021-03-07 12:34:15 +01:00