linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Changheun Lee <nanich.lee@samsung.com>,
	"hch@infradead.org" <hch@infradead.org>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	"alex_y_xu@yahoo.ca" <alex_y_xu@yahoo.ca>,
	"asml.silence@gmail.com" <asml.silence@gmail.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"bgoncalv@redhat.com" <bgoncalv@redhat.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jaegeuk@kernel.org" <jaegeuk@kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>,
	"osandov@fb.com" <osandov@fb.com>,
	"patchwork-bot@kernel.org" <patchwork-bot@kernel.org>,
	"tj@kernel.org" <tj@kernel.org>,
	"tom.leiming@gmail.com" <tom.leiming@gmail.com>,
	"yi.zhang@redhat.com" <yi.zhang@redhat.com>
Cc: "jisoo2146.oh@samsung.com" <jisoo2146.oh@samsung.com>,
	"junho89.kim@samsung.com" <junho89.kim@samsung.com>,
	"mj0123.lee@samsung.com" <mj0123.lee@samsung.com>,
	"seunghwan.hyun@samsung.com" <seunghwan.hyun@samsung.com>,
	"sookwan7.kim@samsung.com" <sookwan7.kim@samsung.com>,
	"woosung2.lee@samsung.com" <woosung2.lee@samsung.com>,
	"yt0928.kim@samsung.com" <yt0928.kim@samsung.com>
Subject: Re: [PATCH v11 3/3] scsi: set max_bio_bytes with queue max sectors
Date: Wed, 2 Jun 2021 12:53:11 +0000	[thread overview]
Message-ID: <DM6PR04MB7081BDEC7ECFB63D3E6345D0E73D9@DM6PR04MB7081.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210602121037.11083-4-nanich.lee@samsung.com

On 2021/06/02 21:29, Changheun Lee wrote:
> Set max_bio_bytes same with queue max sectors. It will lead to fast bio
> submit when bio size is over than queue max sectors. And it might be helpful
> to align submit bio size in some case.
> 
> Signed-off-by: Changheun Lee <nanich.lee@samsung.com>
> ---
>  drivers/scsi/scsi_lib.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 532304d42f00..f6269268b0e0 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1837,6 +1837,8 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
>  	blk_queue_virt_boundary(q, shost->virt_boundary_mask);
>  	dma_set_max_seg_size(dev, queue_max_segment_size(q));
>  
> +	blk_queue_max_bio_bytes(q, queue_max_sectors(q));

Doing this unconditionally for all scsi block devices is probably not a good
idea. Cannot this be moved to the LLD handling the devices that actually need it ?

> +
>  	/*
>  	 * Set a reasonable default alignment:  The larger of 32-byte (dword),
>  	 * which is a common minimum for HBAs, and the minimum DMA alignment,
> 


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2021-06-02 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210602122909epcas1p4f4cad512dd31ed9458ca6049c5074b71@epcas1p4.samsung.com>
2021-06-02 12:10 ` [PATCH v11 0/3] bio: control bio max size Changheun Lee
     [not found]   ` <CGME20210602122910epcas1p17ab868175c38cf3f143b64f4ec59f75c@epcas1p1.samsung.com>
2021-06-02 12:10     ` [PATCH v11 1/3] " Changheun Lee
2021-06-02 12:51       ` Damien Le Moal
     [not found]         ` <CGME20210603084659epcas1p1bc7b425e65bdc6517f69cf5a0e0628dc@epcas1p1.samsung.com>
2021-06-03  8:28           ` Changheun Lee
     [not found]   ` <CGME20210602122911epcas1p1c7574ee73f4da9ce17605a78f864ce95@epcas1p1.samsung.com>
2021-06-02 12:10     ` [PATCH v11 2/3] blk-sysfs: add max_bio_bytes Changheun Lee
     [not found]   ` <CGME20210602122912epcas1p4faff714cc9457b0d482fc1a4b63a49a9@epcas1p4.samsung.com>
2021-06-02 12:10     ` [PATCH v11 3/3] scsi: set max_bio_bytes with queue max sectors Changheun Lee
2021-06-02 12:53       ` Damien Le Moal [this message]
     [not found]         ` <CGME20210603085107epcas1p223fb68f0d992fd9b64df84d8bcfea1f0@epcas1p2.samsung.com>
2021-06-03  8:32           ` Changheun Lee
     [not found]             ` <CGME20210603130204epcas1p1f33c937feb12b181af0c57f464a19f84@epcas1p1.samsung.com>
2021-06-03 12:43               ` Changheun Lee
2021-06-02 19:04       ` Bart Van Assche
     [not found]         ` <CGME20210603094700epcas1p3921df0cd92caca7b098205d35d861eb9@epcas1p3.samsung.com>
2021-06-03  9:28           ` Changheun Lee

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=DM6PR04MB7081BDEC7ECFB63D3E6345D0E73D9@DM6PR04MB7081.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=alex_y_xu@yahoo.ca \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bgoncalv@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jaegeuk@kernel.org \
    --cc=jisoo2146.oh@samsung.com \
    --cc=junho89.kim@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=mj0123.lee@samsung.com \
    --cc=nanich.lee@samsung.com \
    --cc=osandov@fb.com \
    --cc=patchwork-bot@kernel.org \
    --cc=seunghwan.hyun@samsung.com \
    --cc=sookwan7.kim@samsung.com \
    --cc=tj@kernel.org \
    --cc=tom.leiming@gmail.com \
    --cc=woosung2.lee@samsung.com \
    --cc=yi.zhang@redhat.com \
    --cc=yt0928.kim@samsung.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).