加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux中/ queue / rotation的意义是什么?

发布时间:2020-12-14 01:12:20 所属栏目:Linux 来源:网络整理
导读:我正在寻找识别磁盘是SSD还是HDD的方法?我发现有一种方法可以检测到它.这是通过读取cat / sys / block / sda / queue / rotation的值?如果它是1那么它是HDD,否则它是SSD.我想知道这个文件是什么/ sys / block / sda / queue / rotate?为什么它被内核使用
我正在寻找识别磁盘是SSD还是HDD的方法?我发现有一种方法可以检测到它.这是通过读取cat / sys / block / sda / queue / rotation的值?如果它是1那么它是HDD,否则它是SSD.我想知道这个文件是什么/ sys / block / sda / queue / rotate?为什么它被内核使用?这个由内核维护的k对象是什么?

解决方法

来自: https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt

rotational (RW)

This file is used to stat if the device is of rotational type or
non-rotational type.

另见:http://lwn.net/Articles/408428/

Traditionally,the block layer has been driven by the need to avoid head seeks; the use of quite a bit of CPU time could be justified if it managed to avoid a single seek. SSDs – at least the good ones – care a lot less about seeks,so expending a bunch of CPU time to avoid them no longer makes sense. There are various ways of detecting SSDs in the hardware,but they don’t always work,especially with the lower-quality devices. So the block layer exports a flag under

/sys/block/<device>/queue/rotational

which can be used to override the system’s notion of what kind of storage device it is dealing with.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读