* [PATCH 05/11] mtip32xx: Set block queue boundary variables
@ 2012-05-30 1:42 Asai Thambi S P
2012-05-31 6:43 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Asai Thambi S P @ 2012-05-30 1:42 UTC (permalink / raw)
To: Jens Axboe, linux-kernel@vger.kernel.org, Sam Bradshaw
Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
---
drivers/block/mtip32xx/mtip32xx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 9fe897d..801e70c 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3631,7 +3631,11 @@ skip_create_disk:
set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
blk_queue_physical_block_size(dd->queue, 4096);
+ blk_queue_max_hw_sectors(dd->queue, 0xffff);
+ blk_queue_max_segment_size(dd->queue, 0x400000);
blk_queue_io_min(dd->queue, 4096);
+ dd->queue->nr_requests = 255;
+
/*
* write back cache is not supported in the device. FUA depends on
* write back cache support, hence setting flush support to zero.
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-30 1:42 [PATCH 05/11] mtip32xx: Set block queue boundary variables Asai Thambi S P
@ 2012-05-31 6:43 ` Jens Axboe
2012-05-31 15:56 ` Asai Thambi S P
0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2012-05-31 6:43 UTC (permalink / raw)
To: Asai Thambi S P; +Cc: linux-kernel@vger.kernel.org, Sam Bradshaw
On 05/30/2012 03:42 AM, Asai Thambi S P wrote:
>
> Set the following block queue boundary variables
> * max_hw_sectors
> * max_segment_size
> * nr_requests
>
> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
> ---
> drivers/block/mtip32xx/mtip32xx.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
> index 9fe897d..801e70c 100644
> --- a/drivers/block/mtip32xx/mtip32xx.c
> +++ b/drivers/block/mtip32xx/mtip32xx.c
> @@ -3631,7 +3631,11 @@ skip_create_disk:
> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
> blk_queue_physical_block_size(dd->queue, 4096);
> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
> + blk_queue_max_segment_size(dd->queue, 0x400000);
> blk_queue_io_min(dd->queue, 4096);
> + dd->queue->nr_requests = 255;
->nr_requests isn't a boundary variable you set for the queue. It's set
by the core bits, or by the user via the sysfs interface.
So you should not touch that from the driver.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-31 6:43 ` Jens Axboe
@ 2012-05-31 15:56 ` Asai Thambi S P
2012-05-31 17:12 ` Jeff Moyer
0 siblings, 1 reply; 8+ messages in thread
From: Asai Thambi S P @ 2012-05-31 15:56 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-kernel@vger.kernel.org, Sam Bradshaw
On 5/30/2012 11:43 PM, Jens Axboe wrote:
> On 05/30/2012 03:42 AM, Asai Thambi S P wrote:
>>
>> Set the following block queue boundary variables
>> * max_hw_sectors
>> * max_segment_size
>> * nr_requests
>>
>> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
>> ---
>> drivers/block/mtip32xx/mtip32xx.c | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
>> index 9fe897d..801e70c 100644
>> --- a/drivers/block/mtip32xx/mtip32xx.c
>> +++ b/drivers/block/mtip32xx/mtip32xx.c
>> @@ -3631,7 +3631,11 @@ skip_create_disk:
>> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
>> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
>> blk_queue_physical_block_size(dd->queue, 4096);
>> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
>> + blk_queue_max_segment_size(dd->queue, 0x400000);
>> blk_queue_io_min(dd->queue, 4096);
>> + dd->queue->nr_requests = 255;
>
> ->nr_requests isn't a boundary variable you set for the queue. It's set
> by the core bits, or by the user via the sysfs interface.
>
> So you should not touch that from the driver.
>
Ok.
I saw scsi lib module changing it, so thought of changing the value close to
device queue depth.
--
Regards,
Asai Thambi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-31 15:56 ` Asai Thambi S P
@ 2012-05-31 17:12 ` Jeff Moyer
2012-05-31 18:12 ` Asai Thambi S P
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Moyer @ 2012-05-31 17:12 UTC (permalink / raw)
To: Asai Thambi S P; +Cc: Jens Axboe, linux-kernel@vger.kernel.org, Sam Bradshaw
Asai Thambi S P <asamymuthupa@micron.com> writes:
> On 5/30/2012 11:43 PM, Jens Axboe wrote:
>
>> On 05/30/2012 03:42 AM, Asai Thambi S P wrote:
>>>
>>> Set the following block queue boundary variables
>>> * max_hw_sectors
>>> * max_segment_size
>>> * nr_requests
>>>
>>> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
>>> ---
>>> drivers/block/mtip32xx/mtip32xx.c | 4 ++++
>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
>>> index 9fe897d..801e70c 100644
>>> --- a/drivers/block/mtip32xx/mtip32xx.c
>>> +++ b/drivers/block/mtip32xx/mtip32xx.c
>>> @@ -3631,7 +3631,11 @@ skip_create_disk:
>>> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
>>> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
>>> blk_queue_physical_block_size(dd->queue, 4096);
>>> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
>>> + blk_queue_max_segment_size(dd->queue, 0x400000);
>>> blk_queue_io_min(dd->queue, 4096);
>>> + dd->queue->nr_requests = 255;
>>
>> ->nr_requests isn't a boundary variable you set for the queue. It's set
>> by the core bits, or by the user via the sysfs interface.
>>
>> So you should not touch that from the driver.
>>
>
> Ok.
>
> I saw scsi lib module changing it, so thought of changing the value close to
> device queue depth.
That's actually a fair point. What is the device queue depth for this
card?
Cheers,
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-31 17:12 ` Jeff Moyer
@ 2012-05-31 18:12 ` Asai Thambi S P
2012-05-31 18:40 ` Jeff Moyer
0 siblings, 1 reply; 8+ messages in thread
From: Asai Thambi S P @ 2012-05-31 18:12 UTC (permalink / raw)
To: Jeff Moyer; +Cc: Jens Axboe, linux-kernel@vger.kernel.org, Sam Bradshaw
On 5/31/2012 10:12 AM, Jeff Moyer wrote:
> Asai Thambi S P <asamymuthupa@micron.com> writes:
>
>> On 5/30/2012 11:43 PM, Jens Axboe wrote:
>>
>>> On 05/30/2012 03:42 AM, Asai Thambi S P wrote:
>>>>
>>>> Set the following block queue boundary variables
>>>> * max_hw_sectors
>>>> * max_segment_size
>>>> * nr_requests
>>>>
>>>> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
>>>> ---
>>>> drivers/block/mtip32xx/mtip32xx.c | 4 ++++
>>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
>>>> index 9fe897d..801e70c 100644
>>>> --- a/drivers/block/mtip32xx/mtip32xx.c
>>>> +++ b/drivers/block/mtip32xx/mtip32xx.c
>>>> @@ -3631,7 +3631,11 @@ skip_create_disk:
>>>> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
>>>> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
>>>> blk_queue_physical_block_size(dd->queue, 4096);
>>>> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
>>>> + blk_queue_max_segment_size(dd->queue, 0x400000);
>>>> blk_queue_io_min(dd->queue, 4096);
>>>> + dd->queue->nr_requests = 255;
>>>
>>> ->nr_requests isn't a boundary variable you set for the queue. It's set
>>> by the core bits, or by the user via the sysfs interface.
>>>
>>> So you should not touch that from the driver.
>>>
>>
>> Ok.
>>
>> I saw scsi lib module changing it, so thought of changing the value close to
>> device queue depth.
>
> That's actually a fair point. What is the device queue depth for this
> card?
>
256
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-31 18:12 ` Asai Thambi S P
@ 2012-05-31 18:40 ` Jeff Moyer
2012-06-01 6:01 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Moyer @ 2012-05-31 18:40 UTC (permalink / raw)
To: Jens Axboe, Asai Thambi S P; +Cc: linux-kernel@vger.kernel.org, Sam Bradshaw
>>>>> @@ -3631,7 +3631,11 @@ skip_create_disk:
>>>>> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
>>>>> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
>>>>> blk_queue_physical_block_size(dd->queue, 4096);
>>>>> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
>>>>> + blk_queue_max_segment_size(dd->queue, 0x400000);
>>>>> blk_queue_io_min(dd->queue, 4096);
>>>>> + dd->queue->nr_requests = 255;
>>>>
>>>> ->nr_requests isn't a boundary variable you set for the queue. It's set
>>>> by the core bits, or by the user via the sysfs interface.
>>>>
>>>> So you should not touch that from the driver.
>>>>
>>>
>>> Ok.
>>>
>>> I saw scsi lib module changing it, so thought of changing the value close to
>>> device queue depth.
>>
>> That's actually a fair point. What is the device queue depth for this
>> card?
>>
> 256
Jens, I actually think changing nr_requests makes sense; the only
question in my mind is where to do it. (There's no point in artificially
limiting the device by default.) IIRC, your general rule was to set this
value to 2x the device's queue depth. So, given that this driver
doesn't use the blk-tag interfaces, what do you think would be the
cleanest way to bump nr_requests in this (and the more general) case?
Cheers,
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-05-31 18:40 ` Jeff Moyer
@ 2012-06-01 6:01 ` Jens Axboe
2012-06-01 13:11 ` Jeff Moyer
0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2012-06-01 6:01 UTC (permalink / raw)
To: Jeff Moyer; +Cc: Asai Thambi S P, linux-kernel@vger.kernel.org, Sam Bradshaw
On 05/31/2012 08:40 PM, Jeff Moyer wrote:
>>>>>> @@ -3631,7 +3631,11 @@ skip_create_disk:
>>>>>> set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
>>>>>> blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
>>>>>> blk_queue_physical_block_size(dd->queue, 4096);
>>>>>> + blk_queue_max_hw_sectors(dd->queue, 0xffff);
>>>>>> + blk_queue_max_segment_size(dd->queue, 0x400000);
>>>>>> blk_queue_io_min(dd->queue, 4096);
>>>>>> + dd->queue->nr_requests = 255;
>>>>>
>>>>> ->nr_requests isn't a boundary variable you set for the queue. It's set
>>>>> by the core bits, or by the user via the sysfs interface.
>>>>>
>>>>> So you should not touch that from the driver.
>>>>>
>>>>
>>>> Ok.
>>>>
>>>> I saw scsi lib module changing it, so thought of changing the value close to
>>>> device queue depth.
>>>
>>> That's actually a fair point. What is the device queue depth for this
>>> card?
>>>
>> 256
>
> Jens, I actually think changing nr_requests makes sense; the only
> question in my mind is where to do it. (There's no point in artificially
> limiting the device by default.) IIRC, your general rule was to set this
> value to 2x the device's queue depth. So, given that this driver
> doesn't use the blk-tag interfaces, what do you think would be the
> cleanest way to bump nr_requests in this (and the more general) case?
But it doesn't matter for this case, the driver isn't consuming request
structures, hence the value set doesn't make any difference. So the only
limiter of queue depth is the driver itself.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 05/11] mtip32xx: Set block queue boundary variables
2012-06-01 6:01 ` Jens Axboe
@ 2012-06-01 13:11 ` Jeff Moyer
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Moyer @ 2012-06-01 13:11 UTC (permalink / raw)
To: Jens Axboe; +Cc: Asai Thambi S P, linux-kernel@vger.kernel.org, Sam Bradshaw
Jens Axboe <axboe@kernel.dk> writes:
>> Jens, I actually think changing nr_requests makes sense; the only
>> question in my mind is where to do it. (There's no point in artificially
>> limiting the device by default.) IIRC, your general rule was to set this
>> value to 2x the device's queue depth. So, given that this driver
>> doesn't use the blk-tag interfaces, what do you think would be the
>> cleanest way to bump nr_requests in this (and the more general) case?
>
> But it doesn't matter for this case, the driver isn't consuming request
> structures, hence the value set doesn't make any difference. So the only
> limiter of queue depth is the driver itself.
Good point. Nevermind. ;-)
Cheers,
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-06-01 13:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 1:42 [PATCH 05/11] mtip32xx: Set block queue boundary variables Asai Thambi S P
2012-05-31 6:43 ` Jens Axboe
2012-05-31 15:56 ` Asai Thambi S P
2012-05-31 17:12 ` Jeff Moyer
2012-05-31 18:12 ` Asai Thambi S P
2012-05-31 18:40 ` Jeff Moyer
2012-06-01 6:01 ` Jens Axboe
2012-06-01 13:11 ` Jeff Moyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox