[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR04MB37514525E1A0D6176BFAB11BE7950@CY4PR04MB3751.namprd04.prod.outlook.com>
Date: Wed, 24 Jun 2020 00:33:56 +0000
From: Damien Le Moal <Damien.LeMoal@....com>
To: Luis Chamberlain <mcgrof@...nel.org>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"bvanassche@....org" <bvanassche@....org>,
"ming.lei@...hat.com" <ming.lei@...hat.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"satyat@...gle.com" <satyat@...gle.com>
CC: "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] block: add initial kdoc over the request_queue
On 2020/06/24 7:03, Luis Chamberlain wrote:
> We start off with an initial description of the request_queue data
> structure, followed by describing the purpose of the debugfs_mutex
> debugfs_dir, and blk_trace.
>
> Suggested-by: Bart Van Assche <bvanassche@....org>
> Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
> ---
> include/linux/blkdev.h | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 70461b347169..ea319c2b0593 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -394,6 +394,26 @@ static inline int blkdev_zone_mgmt_ioctl(struct block_device *bdev,
>
> #endif /* CONFIG_BLK_DEV_ZONED */
>
> +/**
> + * struct request_queue - block device driver request queue
> + * @debugfs_mutex: used to protect access to the @debugfs_dir
> + * @blk_trace: used by blktrace to keep track of setup / tracing
> + * @debugfs_dir: directory created to place debugfs information. This is always
> + * created for make_request and request-based block drivers upon
> + * initialization. blktrace requires for this directory to be created,
s/requires for/requires/ (may be, not sure of my English grammar on this one :))
> + * and so it will be created on demand if its block driver type does not
> + * create it opon initialization.
s/opon/upon/
> + *
> + * The request_queue is used to manage incoming block layer device driver
> + * requests. We have three main type of block driver types which end up making
We have three main types of block drivers which...
> + * use of the request_queue:
> + *
> + * o make_request block drivers (multiqueue)
> + * o request-based block drivers
Isn't this second one BIO based drivers, like device-mapper BIO targets ?
> + * o custom solutions such as scsi-generic
The SG driver does not create a request queue, it uses the one of the scsi
device created by the scsi stack. Is this what you mean here ? Saying
scsi-generic kind of implies sg driver.
> + *
> + * All partitions share the same request_queue data structure.
> + */
> struct request_queue {
> struct request *last_merge;
> struct elevator_queue *elevator;
>
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists