Re: Quick question about libata and hdparm

From: Robert Hancock
Date: Sun Apr 19 2009 - 02:32:16 EST


Rogério Brito wrote:
Dear people,

I have one small question regarding the libata drivers and the interaction with hdparm.

I am presently using PATA/IDE devices only, but some distributions provide kernels with libata by default (and some defconfigs also use libata even for IDE devices).

Using the usual IDE drivers, I can use/query various parameters with hdparm, like, for instance, the -m option, the -c option or even disabling DMA. With the libata drivers, this is all that I get:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lutz:~# hdparm /dev/sda

/dev/sda:
IO_support = 0 (default)
readonly = 0 (off)
readahead = 256 (on)
geometry = 48641/255/63, sectors = 781420655, start = 0
lutz:~# hdparm -c 1 /dev/sda

/dev/sda:
setting 32-bit IO_support flag to 1
HDIO_SET_32BIT failed: Invalid argument
IO_support = 0 (default)
lutz:~# hdparm -m 16 /dev/sda

/dev/sda:
setting multcount to 16
HDIO_SET_MULTCOUNT failed: Inappropriate ioctl for device
HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device
lutz:~#
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Am I doing something incorrectly? I would like at least to understand what is happening and, if possible, to fine-tune some settings.

If necessary, please let me know and I will provide any further information that may be needed.

libata doesn't support many of the ioctls used by hdparm to control these options. The idea is that the user shouldn't have to mess with them. They were more necessary with old IDE in some cases as it could sometimes end up with brain-dead settings..

The set 32-bit IO support only recently got added in 2.6.30-rc kernels. However, it already defaults to enabled on all controllers where it's supported currently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/