Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-05 Thread Ming Lei
On Thu, Aug 03, 2017 at 05:33:13PM +, Bart Van Assche wrote: > On Thu, 2017-08-03 at 11:13 +0800, Ming Lei wrote: > > On Thu, Aug 03, 2017 at 01:35:29AM +, Bart Van Assche wrote: > > > On Wed, 2017-08-02 at 11:31 +0800, Ming Lei wrote: > > > > On Tue, Aug 01, 2017 at 03:11:42PM +, Bart

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-05 Thread h...@infradead.org
On Thu, Aug 03, 2017 at 05:33:13PM +, Bart Van Assche wrote: > Are you aware that the SCSI core already keeps track of the number of busy > requests > per LUN? See also the device_busy member of struct scsi_device. How about > giving the > block layer core access in some way to that counter?

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-03 Thread Bart Van Assche
On Thu, 2017-08-03 at 11:13 +0800, Ming Lei wrote: > On Thu, Aug 03, 2017 at 01:35:29AM +, Bart Van Assche wrote: > > On Wed, 2017-08-02 at 11:31 +0800, Ming Lei wrote: > > > On Tue, Aug 01, 2017 at 03:11:42PM +, Bart Van Assche wrote: > > > > On Tue, 2017-08-01 at 18:50 +0800, Ming Lei

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-02 Thread Ming Lei
On Thu, Aug 03, 2017 at 01:35:29AM +, Bart Van Assche wrote: > On Wed, 2017-08-02 at 11:31 +0800, Ming Lei wrote: > > On Tue, Aug 01, 2017 at 03:11:42PM +, Bart Van Assche wrote: > > > On Tue, 2017-08-01 at 18:50 +0800, Ming Lei wrote: > > > > On Tue, Aug 01, 2017 at 06:17:18PM +0800, Ming

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-02 Thread Bart Van Assche
On Wed, 2017-08-02 at 11:31 +0800, Ming Lei wrote: > On Tue, Aug 01, 2017 at 03:11:42PM +, Bart Van Assche wrote: > > On Tue, 2017-08-01 at 18:50 +0800, Ming Lei wrote: > > > On Tue, Aug 01, 2017 at 06:17:18PM +0800, Ming Lei wrote: > > > > How can we get the accurate 'number of requests in

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-01 Thread Ming Lei
On Tue, Aug 01, 2017 at 03:11:42PM +, Bart Van Assche wrote: > On Tue, 2017-08-01 at 18:50 +0800, Ming Lei wrote: > > On Tue, Aug 01, 2017 at 06:17:18PM +0800, Ming Lei wrote: > > > How can we get the accurate 'number of requests in progress' efficiently? > > Hello Ming, > > How about

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-01 Thread Bart Van Assche
On Tue, 2017-08-01 at 18:50 +0800, Ming Lei wrote: > On Tue, Aug 01, 2017 at 06:17:18PM +0800, Ming Lei wrote: > > How can we get the accurate 'number of requests in progress' efficiently? Hello Ming, How about counting the number of bits that have been set in the tag set? I am aware that these

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-01 Thread Ming Lei
On Tue, Aug 01, 2017 at 06:17:18PM +0800, Ming Lei wrote: > On Mon, Jul 31, 2017 at 11:34:35PM +, Bart Van Assche wrote: > > On Tue, 2017-08-01 at 00:51 +0800, Ming Lei wrote: > > > SCSI devices use host-wide tagset, and the shared > > > driver tag space is often quite big. Meantime > > >

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-01 Thread Ming Lei
On Mon, Jul 31, 2017 at 11:34:35PM +, Bart Van Assche wrote: > On Tue, 2017-08-01 at 00:51 +0800, Ming Lei wrote: > > SCSI devices use host-wide tagset, and the shared > > driver tag space is often quite big. Meantime > > there is also queue depth for each lun(.cmd_per_lun), > > which is often

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-07-31 Thread Bart Van Assche
On Tue, 2017-08-01 at 00:51 +0800, Ming Lei wrote: > SCSI devices use host-wide tagset, and the shared > driver tag space is often quite big. Meantime > there is also queue depth for each lun(.cmd_per_lun), > which is often small. > > So lots of requests may stay in sw queue, and we > always

[PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-07-31 Thread Ming Lei
SCSI devices use host-wide tagset, and the shared driver tag space is often quite big. Meantime there is also queue depth for each lun(.cmd_per_lun), which is often small. So lots of requests may stay in sw queue, and we always flush all belonging to same hw queue and dispatch them all to driver,