首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何针对特定的驱动程序对libata内核参数进行建模?

如何针对特定的驱动程序对libata内核参数进行建模?
EN

Ask Ubuntu用户
提问于 2012-06-03 16:23:21
回答 1查看 14.9K关注 0票数 7

我正在运行一个22个磁盘的设置,其中19个在ZFS数组中,15个由由sata_sil24模块驱动的SATA控制器上的三个端口乘法器支持。当运行全速(SATA2,3 Gbps)时,操作非常奇怪。简单的读取错误会在很长一段时间内使整个端口乘法器陷入痉挛,有时会产生非常糟糕的结果。使用内核参数libata.force=1.5G引导,迫使SATA控制器进入“遗留”速度,完全解决了端口乘数的所有问题。问题是,我的ZFS池是由我的ICH10R控制器上的快速缓存SSD支持的。这个控制器上的另一个SSD控制着系统。

立即执行libata.force=1.5G会使我的SSD的传输速率减少约100 MB/s。对于根驱动器来说,这没什么大不了的,但是对于ZFS缓存SSD来说,它是这样的。与没有缓存驱动器相比,它有效地使整个zpool用于持续传输的速度更慢。当然,随机访问和fs树查找仍然有好处。列出sata_sil24的模块选项,不存在这样的选项。

如何将libata.force=1.5G参数传递给由sata_sil24模块支持的三个SATA控制器?

EN

回答 1

Ask Ubuntu用户

发布于 2012-06-04 10:36:53

阿!我发现了!

http://www.kernel.org/doc/Documentation/kernel-parameters.txt,它说,

代码语言:javascript
复制
    libata.force=   [LIBATA] Force configurations.  The format is comma
        separated list of "[ID:]VAL" where ID is
        PORT[.DEVICE].  PORT and DEVICE are decimal numbers
        matching port, link or device.  Basically, it matches
        the ATA ID string printed on console by libata.  If
        the whole ID part is omitted, the last PORT and DEVICE
        values are used.  If ID hasn't been specified yet, the
        configuration applies to all ports, links and devices.

        If only DEVICE is omitted, the parameter applies to
        the port and all links and devices behind it.  DEVICE
        number of 0 either selects the first device or the
        first fan-out link behind PMP device.  It does not
        select the host link.  DEVICE number of 15 selects the
        host link and device attached to it.

        The VAL specifies the configuration to force.  As long
        as there's no ambiguity shortcut notation is allowed.
        For example, both 1.5 and 1.5G would work for 1.5Gbps.
        The following configurations can be forced.

        * Cable type: 40c, 80c, short40c, unk, ign or sata.
          Any ID with matching PORT is used.

        * SATA link speed limit: 1.5Gbps or 3.0Gbps.

        * Transfer mode: pio[0-7], mwdma[0-4] and udma[0-7].
          udma[/][16,25,33,44,66,100,133] notation is also
          allowed.

        * [no]ncq: Turn on or off NCQ.

        * nohrst, nosrst, norst: suppress hard, soft
                      and both resets.

        * dump_id: dump IDENTIFY data.

        If there are multiple matching configurations changing
        the same attribute, the last one is used.

因此,棘手的部分是找出哪个端口X和设备Y (dmesg ataX.YY)是哪个控制器和驱动器。我认为-这个表示法与端口.DEVICE相匹配,但也有W:X:Y:Z符号。我猜ataX.YY :)

幸运的是,我上周刚刚手动完成了这个映射(试图识别一个正在抛出痉挛并重置主机控制器的驱动器),因此我已经有了一个详尽的列表:)我找不到从sdX到ataX.Y或W:X:Y:Z的映射所在的任何地方,所以我只需拔出SATA电缆并查看ataX.YY消息出现在/var/log/messages中;

所以,在我的设计中,我似乎需要

代码语言:javascript
复制
libata.force=1:1.5G,2:1.5G,3:1.5G

一旦我的ZFS擦洗完成,就必须试一试,并报告:)太棒了!希望这能帮助其他人:)

票数 7
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/145965

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档