Skip to contentSkip to conversation

mtip32xx: Set block queue boundary variables

PATCH In review Asai Thambi S P 3 participants 8 messages May 30, 2012 – Jun 1, 2012 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 5/11 mtip32xx: Set block queue boundary variables

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests

---
 drivers/block/mtip32xx/mtip32xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +4 -0
index 9fe897d..801e70c 100644
@@ -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.
Signature · 1 line
1.7.1
maintainer
#1 lore raw
Quoted 16 lines · Asai Thambi S P

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests

---
 drivers/block/mtip32xx/mtip32xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +0 -0
index 9fe897d..801e70c 100644

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 7 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 28 lines · Jens Axboe
Quoted 16 lines · Asai Thambi S P

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests

---
 drivers/block/mtip32xx/mtip32xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +0 -0
index 9fe897d..801e70c 100644

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 7 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Quoted 2 lines

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

#3 lore raw
Quoted 30 lines · Asai Thambi S P
Quoted 28 lines · Jens Axboe
Quoted 16 lines · Asai Thambi S P

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests

---
 drivers/block/mtip32xx/mtip32xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +0 -0
index 9fe897d..801e70c 100644

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 7 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Quoted 7 lines
Quoted 2 lines

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

#4 lore raw
Quoted 35 lines · Jeff Moyer
Quoted 33 lines · Asai Thambi S P
Quoted 30 lines · Jens Axboe
Quoted 16 lines · Asai Thambi S P

Set the following block queue boundary variables
* max_hw_sectors
* max_segment_size
* nr_requests

---
 drivers/block/mtip32xx/mtip32xx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +0 -0
index 9fe897d..801e70c 100644

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 7 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Quoted 8 lines
Quoted 4 lines

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

#5 lore raw
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 12 lines

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 8 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Quoted 2 lines

So you should not touch that from the driver.

Ok.

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

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

maintainer
#6 lore raw
Quoted 23 lines · Jeff Moyer
Quoted 23 lines
Quoted 23 lines
Quoted 12 lines
Quoted 12 lines

drivers/block/mtip32xx/mtip32xx.c skip_create_disk: · line 3637

Quoted 8 lines
drivers/block/mtip32xx/mtip32xx.c +3 -0
@@ -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.

Quoted 7 lines
Quoted 2 lines

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?

Quoted 8 lines
Quoted 1 line

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.

Signature · 1 line
Jens Axboe
#7 lore raw
Quoted 10 lines · Jens Axboe
Quoted 6 lines

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