FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    reconciledthief Guest

    NCQ queue_depth permission denied when changing

    Hello! This is my first post...

    I have a question concerning NCQ. I would like to enable it, as it is currently disabled on my machine.

    [root@core ~]# cat /sys/block/sdb/device/queue_depth
    1

    I have 3 Seagate ST3500320AS 500GB drives connected to a Promise SATA 300 TX4 controller.

    However, when I try to enable a greater queue_depth, I get this:

    [root@core ~]# echo 31 > /sys/block/sdb/device/queue_depth
    -bash: /sys/block/sdb/device/queue_depth: Permission denied

    The sysfs filesystem is mounted read-write:
    [root@core ~]# mount
    /dev/mapper/vg_root-lv_root on / type ext3 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)

    But the queue_depth pseudo file is read only:
    [root@core ~]# ls -altr /sys/block/sdb/device/queue_depth
    -r--r--r-- 1 root root 0 2008-06-12 18:25 /sys/block/sdb/device/queue_depth

    If I try to change the permissions on the queue_depth pseudo file, I get this:
    [root@core ~]# chmod u+w /sys/block/sdb/device/queue_depth
    [root@core ~]# echo 31 > /sys/block/sdb/device/queue_depth
    -bash: echo: write error: Input/output error


    Does anyone have any ideas? I would like to enable NCQ to do some benchmarking.

    Here's the hardware setup:
    [root@core ~]# lspci
    00:00.0 Host bridge: Silicon Integrated Systems [SiS] 745 Host (rev 01)
    00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
    00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)
    00:02.1 SMBus: Silicon Integrated Systems [SiS] SiS961/2 SMBus Controller
    00:02.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)
    00:02.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)
    00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)
    00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
    00:08.0 Mass storage controller: Promise Technology, Inc. PDC40718 (SATA 300 TX4) (rev 02)
    00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
    00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
    01:00.0 VGA compatible controller: Intel Corporation 82740 (i740) AGP Graphics Accelerator (rev 21)


    Drives from dmesg:
    [root@core ~]# dmesg | grep -i ncq
    ata3.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
    ata4.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
    ata5.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)

  2. #2
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,407
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)
    Hi
    I've been looking into this too, I think the readonly nature of the queue_depth field
    means you don't have ncq support in your sata module.

    So it might be:

    1) need to use/load a different ata module to get NCQ support
    2) there is no supported module (yet)
    3) you have the module installed etc but the bios has AHCI turned off
    or chipset doesn't support it
    4) your module and motherboard support NCQ but the disk doesn't
    (can confirm this with hdparm -I I think)

    At work I had the same thing, so
    I looked into the modules, my high end test machine
    (Dell XPS 720 Q6600 /8800GTX Fedora 9 X86_64)
    has two large Seagate SATA disks. They report via hdparm that they
    support NCQ (hdparm -I /dev/sda and hdparm -I /dev/sdb, note the "*" on the NCQ entry
    shows your disks have it). That was so surprise as they are brand new 300 GB disks.

    when you cat the queue_depth value they mean:

    queue_depth == 0 no DMA, no NCQ
    queue_depth == 1 DMA only
    queue_depth odd values from 3 to 31, increasing queuing and dma
    " " even values 2-30 same as above but no DMA on

    My machine is using sata_nv but I think to use NCQ I have to use ahci,
    but here I see some comment about Nvidia allowing out info about their
    chipset that would allow putting NCQ support into the existing
    module (like sata_nv) but only after people sign an NDA:

    http://linuxmafia.com/faq/Hardware/sata.html#nvidia

    then it cryptically says
    "Note that newer Nvidia chipsets have switched to the AHCI open standard"
    But it doesn't say what those chipsets would be.

    hopefully soon, nvidia will just use ahci and the whole thing will
    just work, no need for NDA's etc.

    ps. the big place for ata /sata info for linux is http://linux-ata.org/
    but I've had no luck loading it. Google has recent caches of it
    (this month) but it won't load here.

    I'm not going to work too hard on this at work because NCQ isn't
    anything I really need to have, the disk speed is ok so far and I'll just wait
    for the libata support and the rest to iron this out.

    pps. also found this discussion last year:
    http://linux.derkeiler.com/Mailing-L.../msg04449.html

    I think my Dell XPS 720 uses the MCP55 and what they're saying here
    seems to suggest slow development of the support for the chipset for
    NCQ.... maybe it's not in the code even now.

    Mark
    Last edited by marko; 13th June 2008 at 12:45 AM.

  3. #3
    reconciledthief Guest
    Thanks for your response!

    1) It uses the sata_promise module. My card _definitely_ support NCQ. The white papers, data sheets, product info all agree.
    2) It's possible that the sata_promise module doesn't include NCQ support. However, I recall reading an e-mail on a mailing list stating that it is now included. I could be wrong, though.
    3) I will have to see if I can get into the BIOS of the sata 300 tx4 card. This is a PCI card, so it should be motherboard-chipset agnostic.
    4) dmesg tells me that the disk has NCQ support. So do the seagate white papers and data sheets. If you are correct, I will be quite upset with newegg and seagate. hdparm says nothing of the sort, though so I will look into the firmware of the drive. I'm fairly confident that it's supposed to support NCQ, but I also recall reading about flaky firmwares on this model drive when I was making my purchase.

    I'll have to do some more investigation, but at this time, the most likely culprits are:
    sata_promise module doesn't support NCQ yet.
    Disk firmware doesn't fully support it and thus needs to be reprogrammed.

    Thanks for your help!

  4. #4
    Join Date
    Nov 2004
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Attach your dmesg output, or grep for "ncq" in it. You should see a line that talks about your SATA controller features and ncq should be listed.
    Lulz

  5. #5
    reconciledthief Guest
    Quote Originally Posted by mooninite
    Attach your dmesg output, or grep for "ncq" in it. You should see a line that talks about your SATA controller features and ncq should be listed.

    You'll find this in the original post. It's the last 4 or 5 lines.

  6. #6
    A.Serbinski Guest
    The drive supports it just fine, the problem is with your promise driver. This page here: http://linux-ata.org/driver-status.html confirms it, unfortunately, their server seems to be down at the moment.

    You'll either need to swap the drives to another controller (if you have), buy and install another controller, or wait until support is added to the driver.

  7. #7
    reconciledthief Guest
    Quote Originally Posted by A.Serbinski
    The drive supports it just fine, the problem is with your promise driver. This page here: http://linux-ata.org/driver-status.html confirms it, unfortunately, their server seems to be down at the moment.

    You'll either need to swap the drives to another controller (if you have), buy and install another controller, or wait until support is added to the driver.

    I read that a couple of days ago and it wasn't completely clear. I thought it was referring to tagged command queuing, not native command queuing.

    I'm probably going to buy another controller, though, and use this one elsewhere.

    Thanks for your help!

  8. #8
    Join Date
    Nov 2004
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by reconciledthief
    You'll find this in the original post. It's the last 4 or 5 lines.
    Then your kernel module doesn't support NCQ. You should get this:

    Code:
    $ grep -i ncq /var/log/dmesg
    ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part 
    ata1.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)
    Lulz

Similar Threads

  1. ssh - permission denied
    By platomxv in forum Servers & Networking
    Replies: 3
    Last Post: 18th November 2008, 09:36 PM
  2. permission denied
    By alin19 in forum Using Fedora
    Replies: 6
    Last Post: 9th July 2008, 04:41 PM
  3. changing process priorities - permission denied
    By slade17 in forum Using Fedora
    Replies: 0
    Last Post: 6th December 2007, 11:24 PM
  4. Permission denied
    By mirrorworld in forum Using Fedora
    Replies: 8
    Last Post: 6th June 2006, 10:00 PM
  5. Permission Denied
    By kushboy in forum Using Fedora
    Replies: 3
    Last Post: 9th August 2004, 05:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •