Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-19 Thread Changheun Lee
> On 4/18/21 10:49 PM, Changheun Lee wrote: > >>> @@ -167,6 +168,7 @@ void blk_queue_max_hw_sectors(struct request_queue > >>> *q, unsigned int max_hw_secto > >>> max_sectors = round_down(max_sectors, > >>>limits-&

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-19 Thread Changheun Lee
af 100644 > > --- a/include/linux/bio.h > > +++ b/include/linux/bio.h > > @@ -106,6 +106,8 @@ static inline void *bio_data(struct bio *bio) > > return NULL; > > } > > > > +extern unsigned int bio_max_size(struct bio *bio); > > You may want to define bio_max_size() as an inline function in bio.h > such that no additional function calls are introduced in the hot path. I tried, but it is not easy. because request_queue structure of blkdev.h should be referred in bio.h. I think it's not good to apply as a inline function. Thanks, Changheun Lee.

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-16 Thread Changheun Lee
> On 4/15/21 3:38 AM, Changheun Lee wrote: > > @@ -167,6 +168,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, > > unsigned int max_hw_secto > > max_sectors = round_down(max_sectors, > > limits->logical_block_size &g

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-15 Thread Changheun Lee
> On 4/12/21 7:55 PM, Changheun Lee wrote: > > +unsigned int bio_max_size(struct bio *bio) > > +{ > > + struct request_queue *q = bio->bi_bdev->bd_disk->queue; > > + > > + if (blk_queue_limit_bio_size(q)) > > +

Re: [PATCH v7 2/3] ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE

2021-04-13 Thread Changheun Lee
> On 4/12/21 7:55 PM, Changheun Lee wrote: > > Set QUEUE_FLAG_LIMIT_BIO_SIZE queue flag to limit bio max size to > > queue max sectors size for UFS device. > > > > Signed-off-by: Changheun Lee > > --- > > drivers/scsi/scsi_lib.c | 2 ++ > > driv

Re: [PATCH v7 3/3] bio: add limit_bio_size sysfs

2021-04-13 Thread Changheun Lee
> On Tue, Apr 13, 2021 at 11:55:02AM +0900, Changheun Lee wrote: > > Add limit_bio_size block sysfs node to limit bio size. > > Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. > > And bio max size will be limited by queue max sectors via > > QU

Re: [RESEND,v5,1/2] bio: limit bio max size

2021-04-12 Thread Changheun Lee
> On Sun, Apr 11, 2021 at 10:13:01PM +, Damien Le Moal wrote: > > On 2021/04/09 23:47, Bart Van Assche wrote: > > > On 4/7/21 3:27 AM, Damien Le Moal wrote: > > >> On 2021/04/07 18:46, Changheun Lee wrote: > > >>> I'll prepare new pat

[PATCH v7 3/3] bio: add limit_bio_size sysfs

2021-04-12 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- Documentation/ABI/testing/sysfs-block | 10

[PATCH v7 1/3] bio: limit bio max size

2021-04-12 Thread Changheun Lee
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 --- block/bio.c| 13 - block/blk-settings.c | 17 + include/linux/bio.h| 4 +++- include/linux/blkdev.h | 4 4

[PATCH v7 0/3] limit bio max size

2021-04-12 Thread Changheun Lee
I found a inefficient behavior from multipage bvec. Large chunk DIO scenario is that. This patch series could be a solution to improve it. Changheun Lee (3): bio: limit bio max size ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE bio: add limit_bio_size sysfs Documentation/ABI/testing/sysfs-block | 10

[PATCH v7 2/3] ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE

2021-04-12 Thread Changheun Lee
Set QUEUE_FLAG_LIMIT_BIO_SIZE queue flag to limit bio max size to queue max sectors size for UFS device. Signed-off-by: Changheun Lee --- drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/ufs/ufshcd.c | 1 + include/scsi/scsi_host.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers

[PATCH v6 3/3] bio: add limit_bio_size sysfs

2021-04-11 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- Documentation/ABI/testing/sysfs-block | 10

[PATCH v6 2/3] ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE

2021-04-11 Thread Changheun Lee
Set QUEUE_FLAG_LIMIT_BIO_SIZE queue flag to limit bio max size to queue max sectors size for UFS device. Signed-off-by: Changheun Lee --- drivers/scsi/scsi_lib.c | 2 ++ drivers/scsi/ufs/ufshcd.c | 1 + include/scsi/scsi_host.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers

[PATCH v6 1/3] bio: limit bio max size

2021-04-11 Thread Changheun Lee
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 --- block/bio.c| 13 - block/blk-settings.c | 17 + include/linux/bio.h| 2 +- include/linux/blkdev.h | 4 4 files c

[PATCH v6 0/3] limit bio max size

2021-04-11 Thread Changheun Lee
I found a inefficient behavior from multipage bvec. Large chunk DIO scenario is that. This patch series could be a solution to improve it. Changheun Lee (3): bio: limit bio max size ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE bio: add limit_bio_size sysfs Documentation/ABI/testing/sysfs-block | 10

Re: [RESEND,v5,1/2] bio: limit bio max size

2021-04-07 Thread Changheun Lee
> On Wed, Apr 07, 2021 at 03:55:07PM +0900, Changheun Lee wrote: > > > On Wed, Apr 07, 2021 at 02:06:33PM +0900, Changheun Lee wrote: > > > > > On Wed, Apr 07, 2021 at 09:16:12AM +0900, Changheun Lee wrote: > > > > > > > On Tue, Apr 0

Re: [RESEND PATCH v5 1/2] bio: limit bio max size

2021-04-07 Thread Changheun Lee
> On Wed, Apr 07, 2021 at 02:06:33PM +0900, Changheun Lee wrote: > > > On Wed, Apr 07, 2021 at 09:16:12AM +0900, Changheun Lee wrote: > > > > > On Tue, Apr 06, 2021 at 10:31:28AM +0900, Changheun Lee wrote: > > > > > > > bio size c

Re: [RESEND PATCH v5 1/2] bio: limit bio max size

2021-04-06 Thread Changheun Lee
> On Wed, Apr 07, 2021 at 09:16:12AM +0900, Changheun Lee wrote: > > > On Tue, Apr 06, 2021 at 10:31:28AM +0900, Changheun Lee wrote: > > > > > bio size can grow up to 4GB when muli-page bvec is enabled. > > > > > but sometimes it would lead to ineffic

Re: [RESEND PATCH v5 2/2] bio: add limit_bio_size sysfs

2021-04-06 Thread Changheun Lee
> On 3/16/21 12:44 AM, Changheun Lee wrote: > > Add limit_bio_size block sysfs node to limit bio size. > > Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. > > And bio max size will be limited by queue max sectors via > > QUEUE_FLAG_LIMIT_BIO_SI

Re: [RESEND PATCH v5 1/2] bio: limit bio max size

2021-04-06 Thread Changheun Lee
> On Tue, Apr 06, 2021 at 10:31:28AM +0900, Changheun Lee wrote: > > > 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 -

[RESEND PATCH v5 1/2] bio: limit bio max size

2021-04-05 Thread Changheun Lee
|--->| > 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.

[RESEND PATCH v5 2/2] bio: add limit_bio_size sysfs

2021-03-16 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- Documentation/ABI/testing/sysfs-block | 10

[RESEND PATCH v5 1/2] bio: limit bio max size

2021-03-16 Thread Changheun Lee
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 --- block/bio.c| 13 - include/linux/bio.h| 2 +- include/linux/blkdev.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-

Re: [PATCH v5 1/2] bio: limit bio max size

2021-02-15 Thread Changheun Lee
> > On Tue, Feb 16, 2021 at 11:00:32AM +0900, Changheun Lee wrote: > > Please feedback to me if more modification is needed to apply. :) > > No context here :( > I'm so sorry. I missed it. > bio size can grow up to 4GB when muli-page bvec is enabled. >

[PATCH v5 1/2] bio: limit bio max size

2021-02-15 Thread Changheun Lee
Please feedback to me if more modification is needed to apply. :) --- Changheun Lee

[PATCH v5 2/2] bio: add limit_bio_size sysfs

2021-02-03 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- Documentation/ABI/testing/sysfs-block | 10

[PATCH v5 1/2] bio: limit bio max size

2021-02-03 Thread Changheun Lee
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 --- block/bio.c| 13 - include/linux/bio.h| 2 +- include/linux/blkdev.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-

[PATCH 2/2] bio: add limit_bio_size sysfs

2021-02-03 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee Signed-off-by: nanich.lee --- Documentation

[PATCH v4 2/2] bio: add limit_bio_size sysfs

2021-02-03 Thread Changheun Lee
Add limit_bio_size block sysfs node to limit bio size. Queue flag QUEUE_FLAG_LIMIT_BIO_SIZE will be set if limit_bio_size is set. And bio max size will be limited by queue max sectors via QUEUE_FLAG_LIMIT_BIO_SIZE set. Signed-off-by: Changheun Lee --- block/blk-sysfs.c | 3 +++ 1 file changed

Re: [PATCH v4 1/2] bio: limit bio max size

2021-02-02 Thread Changheun Lee
> On Tue, Feb 02, 2021 at 01:12:04PM +0900, Changheun Lee wrote: > > > On Mon, Feb 01, 2021 at 11:52:48AM +0900, Changheun Lee wrote: > > > > > On Fri, Jan 29, 2021 at 12:49:08PM +0900, Changheun Lee wrote: > > > > > > bio size can

Re: [PATCH v4 1/2] bio: limit bio max size

2021-02-01 Thread Changheun Lee
> On Mon, Feb 01, 2021 at 11:52:48AM +0900, Changheun Lee wrote: > > > On Fri, Jan 29, 2021 at 12:49:08PM +0900, Changheun Lee wrote: > > > > bio size can grow up to 4GB when muli-page bvec is enabled. > > > > but sometimes it would lead to inefficient behav

Re: [PATCH v4 1/2] bio: limit bio max size

2021-01-31 Thread Changheun Lee
> On Fri, Jan 29, 2021 at 12:49:08PM +0900, Changheun Lee wrote: > > 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 pag

[PATCH v4 2/2] bio: add limit_bio_size sysfs

2021-01-28 Thread Changheun Lee
Add new sysfs node to limit bio size. Signed-off-by: Changheun Lee --- block/blk-sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b513f1683af0..840d97f427e6 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -288,6 +288,7

[PATCH v4 1/2] bio: limit bio max size

2021-01-28 Thread Changheun Lee
per large bio can be created. And it lead to delay first I/O request issue. Signed-off-by: Changheun Lee --- block/bio.c| 13 - include/linux/bio.h| 2 +- include/linux/blkdev.h | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/block/bio.c b/blo

Re: [PATCH v3 1/2] bio: limit bio max size

2021-01-26 Thread Changheun Lee
> On 2021/01/26 18:37, Changheun Lee wrote: > > 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 b

Re: [PATCH 1/1] scsi: sd: use max_xfer_blocks for set rw_max if max_xfer_blocks is available

2021-01-26 Thread Changheun Lee
t to zero, then there is no reported optimal transfer size. Thank you for kindly feedback. :) --- Changheun Lee Samsung Electronics

Re: [PATCH v3 1/2] bio: limit bio max size

2021-01-26 Thread Changheun Lee
> On Tue, Jan 26, 2021 at 06:26:02AM +, Damien Le Moal wrote: > > On 2021/01/26 15:07, Ming Lei wrote: > > > On Tue, Jan 26, 2021 at 04:06:06AM +, Damien Le Moal wrote: > > >> On 2021/01/26 12:58, Ming Lei wrote: > > >>> On Tue, Jan 26,

Re: [PATCH v3 1/2] bio: limit bio max size

2021-01-26 Thread Changheun Lee
> On 2021/01/27 9:36, Changheun Lee wrote: > >>> + > >>> /** > >>> * bio_reset - reinitialize a bio > >>> * @bio: bio to reset > >>> @@ -877,7 +892,7 @@ bool __bio_try_merge_page(struct bio *bio, struct > >>> p

[PATCH v3 1/2] bio: limit bio max size

2021-01-26 Thread Changheun Lee
per large bio can be created. And it lead to delay first I/O request issue. Signed-off-by: Changheun Lee --- block/bio.c| 17 - include/linux/bio.h| 4 +++- include/linux/blkdev.h | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/block

Re: [PATCH 1/1] scsi: sd: use max_xfer_blocks for set rw_max if max_xfer_blocks is available

2021-01-26 Thread Changheun Lee
> Damien, > > >> How about set larger valid value between sdkp->max_xfer_blocks, > >> and sdkp->opt_xfer_blocks to rw_max? > > > > Again, if your device reports an opt_xfer_blocks value that is too > > small for its own good, that is a problem with this device. > > Correct. It is very much

[PATCH v3 2/2] bio: add limit_bio_size sysfs

2021-01-26 Thread Changheun Lee
Add new sysfs node to limit bio size. Signed-off-by: Changheun Lee --- block/blk-sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b513f1683af0..840d97f427e6 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -288,6 +288,7

[PATCH v3 1/2] bio: limit bio max size

2021-01-26 Thread Changheun Lee
per large bio can be created. And it lead to delay first I/O request issue. Signed-off-by: Changheun Lee --- block/bio.c| 17 - include/linux/bio.h| 4 +++- include/linux/blkdev.h | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/block

Re: [PATCH v2] bio: limit bio max size

2021-01-24 Thread Changheun Lee
> On Thu, Jan 21, 2021 at 09:58:03AM +0900, Changheun Lee wrote: > > 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 pag

Re: [PATCH 1/1] scsi: sd: use max_xfer_blocks for set rw_max if max_xfer_blocks is available

2021-01-21 Thread Changheun Lee
> On 2021/01/20 15:45, Manjong Lee wrote: > > Add recipients for more reviews. > > Please resend instead of replying to your own patch. The reply quoting > corrupts > the patch. > > The patch title is very long. > > > > >> SCSI device has max_xfer_size and opt_xfer_size, > >> but current

Re: [PATCH v2] bio: limit bio max size

2021-01-21 Thread Changheun Lee
> On Thu, 2021-01-21 at 18:36 +0900, Changheun Lee wrote: > > > Please drop the "." at the end of the patch title. > > > > > > > bio size can grow up to 4GB when muli-page bvec is enabled. > > > > but sometimes it would lead to inefficie

Re: [PATCH v2] bio: limit bio max size

2021-01-21 Thread Changheun Lee
|---> >> |--->| >> total 17ms elapsed to complete 32MB read done from device. | >> >> As a result, read request issue timing is faster if bio max

[PATCH v2] bio: limit bio max size.

2021-01-20 Thread Changheun Lee
per large bio can be created. And it lead to delay first I/O request issue. Signed-off-by: Changheun Lee --- block/bio.c | 17 - include/linux/bio.h | 13 +++-- include/linux/blk_types.h | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) diff --git

Re: [PATCH] bio: limit bio max size.

2021-01-13 Thread Changheun Lee
i wrote: >>>>>> On Wed, Jan 13, 2021 at 09:28:02AM +, Damien Le Moal wrote: >>>>>>> On 2021/01/13 18:19, Ming Lei wrote: >>>>>>>> On Wed, Jan 13, 2021 at 12:09 PM Changheun Lee >>>>>>>> wrote: >>>>

Re: Re: [PATCH] bio: limit bio max size.

2021-01-12 Thread Changheun Lee
>On 2021/01/13 13:01, Changheun Lee wrote: >>> On 2021/01/12 21:14, Changheun Lee wrote: >>>>> On 2021/01/12 17:52, Changheun Lee wrote: >>>>>> From: "Changheun Lee" >>>>>> >>>>>> bio size can grow

Re: Re: [PATCH] bio: limit bio max size.

2021-01-12 Thread Changheun Lee
>On 2021/01/12 21:14, Changheun Lee wrote: >>> On 2021/01/12 17:52, Changheun Lee wrote: >>>> From: "Changheun Lee" >>>> >>>> bio size can grow up to 4GB when muli-page bvec is enabled. >>>> but sometimes it would lead to ineff

Re: Re: [PATCH] bio: limit bio max size.

2021-01-12 Thread Changheun Lee
>On 2021/01/12 17:52, Changheun Lee wrote: >> From: "Changheun Lee" >> >> 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, - 64MB chunk read

[PATCH] bio: limit bio max size.

2021-01-12 Thread Changheun Lee
From: "Changheun Lee" 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, - 64MB chunk read in user space - all pages for 64MB would be merged to a bio structure if memory address is