Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513890

Re: [PATCH 5/8] block: add code to track actual device queue depth

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!bofh.it!news.nic.it!robomod
From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH 5/8] block: add code to track actual device queue depth
Date Wed, 02 Nov 2016 16:00:01 +0100
Message-ID <sz5bb-7Ce-1@gated-at.bofh.it> (permalink)
References <syODn-5xo-7@gated-at.bofh.it> <syODn-5xo-23@gated-at.bofh.it>
X-Original-To Jens Axboe <axboe@fb.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.17 (2007-11-01)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 36
Organization linux.* mail to news gateway
X-Original-Cc axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, jack@suse.cz, hch@lst.de
X-Original-Date Wed, 2 Nov 2016 15:59:08 +0100
X-Original-Message-ID <20161102145908.GI13964@lst.de>
X-Original-References <1478034531-28559-1-git-send-email-axboe@fb.com> <1478034531-28559-6-git-send-email-axboe@fb.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1513890

Show key headers only | View raw


On Tue, Nov 01, 2016 at 03:08:48PM -0600, Jens Axboe wrote:
> For blk-mq, ->nr_requests does track queue depth, at least at init
> time. But for the older queue paths, it's simply a soft setting.
> On top of that, it's generally larger than the hardware setting
> on purpose, to allow backup of requests for merging.
> 
> Fill a hole in struct request with a 'queue_depth' member, that

That would be struct request_queue..

>  /**
> + * blk_set_queue_depth - tell the block layer about the device queue depth
> + * @q:		the request queue for the device
> + * @depth:		queue depth
> + *
> + */
> +void blk_set_queue_depth(struct request_queue *q, unsigned int depth)
> +{
> +	q->queue_depth = depth;
> +}
> +EXPORT_SYMBOL(blk_set_queue_depth);

Do we really need this wrapper?

> +++ b/drivers/scsi/scsi.c
> @@ -621,6 +621,9 @@ int scsi_change_queue_depth(struct scsi_device *sdev, int depth)
>  		wmb();
>  	}
>  
> +	if (sdev->request_queue)
> +		blk_set_queue_depth(sdev->request_queue, depth);
> +
>  	return sdev->queue_depth;

Can we kill the scsi_device queue_depth member and just always use
the request_queue one?

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 5/8] block: add code to track actual device queue depth Jens Axboe <axboe@fb.com> - 2016-11-01 22:20 +0100
  Re: [PATCH 5/8] block: add code to track actual device queue depth Christoph Hellwig <hch@lst.de> - 2016-11-02 16:00 +0100
    Re: [PATCH 5/8] block: add code to track actual device queue depth Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-02 17:50 +0100
  Re: [PATCH 5/8] block: add code to track actual device queue depth Jan Kara <jack@suse.cz> - 2016-11-05 23:40 +0100

csiph-web