Bug 460558

Summary: RHEL 4 (even on RHEL 4 u7) not able to modify NCQ(echo 1 >queue_depth) settings
Product: Red Hat Enterprise Linux 4 Reporter: Shane Bradley <sbradley>
Component: kernelAssignee: David Milburn <dmilburn>
Status: CLOSED NOTABUG QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: jgarzik, tao, vgoyal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-03 20:44:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmidecode of the machien
none
sysreport of the machine none

Description Shane Bradley 2008-08-28 16:01:08 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1

With RHEL 4(U7), We are not able to NCQ. At the same time with RHEL 5 it is possible

Customer is trying to run some bench marks(with and without NCQ) and bumped across this


Results taken from local lab

RHEL 4u6 and 4U7 will give below result
+++++++++++++++++++++++++++++++++++++++

[root@dhcp6-118 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)

[root@dhcp6-118 ~]# grep -i ncq /var/log/dmesg
ahci 0000:00:12.0: flags: 64bit ncq ilck pm led clo pmp pio slum part
ata1.00: ATA-7, max UDMA/133, 312581808 sectors: LBA48 NCQ (depth 31/32)

[root@dhcp6-118 ~]# cat /sys/block/sda/device/queue_depth
31
[root@dhcp6-118 ~]# echo 1 > /sys/block/sda/device/queue_depth
-bash: /sys/block/sda/device/queue_depth: Permission denied

[root@dhcp6-118 ~]# echo 31 > /sys/block/sda/device/queue_depth
-bash: /sys/block/sda/device/queue_depth: Permission denied


RHEL 5.2 It works fine
++++++++++++++++++++++

[root@dhcp6-118 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.2 (Tikanga)

[root@dhcp6-118 ~]# grep -i ncq /var/log/dmesg
ahci 0000:00:12.0: flags: ncq sntf ilck pm led clo pio slum part
ata1.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 31/32)

[root@dhcp6-118 ~]# cat /sys/block/sda/device/queue_depth
31
[root@dhcp6-118 ~]# echo 1 > /sys/block/sda/device/queue_depth
[root@dhcp6-118 ~]# cat /sys/block/sda/device/queue_depth
1
[root@dhcp6-118 ~]# echo 31 > /sys/block/sda/device/queue_depth
[root@dhcp6-118 ~]# cat /sys/block/sda/device/queue_depth

Reproducible: Always

Steps to Reproduce:
[root@dhcp6-118 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)

[root@dhcp6-118 ~]# grep -i ncq /var/log/dmesg
ahci 0000:00:12.0: flags: 64bit ncq ilck pm led clo pmp pio slum part
ata1.00: ATA-7, max UDMA/133, 312581808 sectors: LBA48 NCQ (depth 31/32)

[root@dhcp6-118 ~]# cat /sys/block/sda/device/queue_depth
31
[root@dhcp6-118 ~]# echo 1 > /sys/block/sda/device/queue_depth
-bash: /sys/block/sda/device/queue_depth: Permission denied

[root@dhcp6-118 ~]# echo 31 > /sys/block/sda/device/queue_depth
-bash: /sys/block/sda/device/queue_depth: Permission denied
Actual Results:  
It appears that queue_depth is read only.

Expected Results:  
The ability to modifiy queue_depth

Comment 1 Shane Bradley 2008-08-28 16:02:27 UTC
Created attachment 315230 [details]
dmidecode of the machien

Comment 2 Shane Bradley 2008-08-28 16:03:03 UTC
Created attachment 315231 [details]
sysreport of the machine

Comment 5 David Milburn 2009-09-03 20:44:34 UTC
Under RHEL4 the /sys/block/sdX/device/queue_depth param is read-only, changing
this to rd/wr in drivers/scsi/scsi_sysfs.c could have negative implications
for other sata/scsi devices. We could build some custom kernels for testing-purposes only, but, I am sorry we cannot change the queue_depth param at this
point in RHEL4.