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


Groups > linux.kernel > #1513965

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

From Johannes Thumshirn <jthumshirn@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH 5/8] block: add code to track actual device queue depth
Date 2016-11-02 17:50 +0100
Message-ID <sz6TD-jL-1@gated-at.bofh.it> (permalink)
References <syODn-5xo-7@gated-at.bofh.it> <syODn-5xo-23@gated-at.bofh.it> <sz5bb-7Ce-1@gated-at.bofh.it> <sz6TD-jL-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Nov 02, 2016 at 09:02:08AM -0600, Jens Axboe wrote:
> On 11/02/2016 08:59 AM, Christoph Hellwig wrote:
> > 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..
> 
> Good catch, will fix.
> 
> > >  /**
> > > + * 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?
> 
> Not necessarily, just seems like a nicer API than manually setting the
> field. Not a big deal to me, though.

A lot of block code uses this kind of setters so I _think_ it complies with
the overall style. But I have no strong opinion on this either...

Byte,
	Johannes
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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