Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Preview of linux I Pot O Stack (part two)

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Second, preview

Since we described the structure of the high-level I _ stack in the previous article, let's talk about the underlying structure.

This section, probably the vast majority of people in the actual work, is not related to development, but is also very important in linux I hand O.

Let's list them one by one and talk about what they are.

1. Block Layer, many years ago, when I was looking at the SCSI subsystem, I wasn't quite sure what Block Layer was, because I had to understand block device, BIO, and a series of request_fn. So it should not be easy to understand block layer, because it is a very abstract concept, much less can be summarized in a word, but we can see one point from the diagram, that is, after multiple bio of block layer, it finally becomes an ordered request, then we should be able to see that it can sort and merge bio, and can make request from bios.

2. Linux O scheduler and blkmq, because of a feature of disk access caused by disk access data seek and rotation delay, linux designed a special map bios to requests method for the disk, which is called I scheduler O scheduler. From the structure of this function, the time difference between a request from init to build is used for map bios, and this time difference is uncontrollable for the linux O scheduler. Linux iUniver stack provides a proprietary method for this. It is called blk_plug and blk_unplug, that is, when the bios is distributed from the upper layer, the upper layer knows that some bios is needed and can be merged and sorted, so it is necessary for the upper layer to plug the bios seq, and the unplug triggers the build request. This process usually requires cooperation between block device and LIO/VFS.

Blkmq: it is a new queue model designed by linux for those devices that do not need to do I scheduler. It has the characteristic of high concurrency. It is suitable for new devices with high hardware queue depth, such as nvme ssd. Because it is almost no longer dependent on blk_plug and other processing processes that increase latency, the performance of this Imax O queue model will be very high.

3. Scsi mid layer:scsi subsystem has always been a big subsystem that supports storage protocols, and even its interior is divided into high layer, mid layer and low layer. The characteristics of these three layers are like the colonial structure of the colonial period, in which the colonists who play the role of high layer, who are not familiar with the local area, need to establish a puppet regime there to ensure their dominance, that is, the scsi disk,scsi tape,scsi cdrom used to implement the high layer in the scsi subsystem, the device description of the advanced features of scsi, they release scsi cmd in the same way regardless of the local situation. In order to ensure that scsi high layer's commands are carried out, then the puppet regime in scsi subsystem, that is, the scsi structure network layer, scsi mid layer has constructed a hierarchical topology: host:channel:target:lun, and all low layer must follow this topology, although it is cruel, even when a host is registered. The way it can communicate directly with low layer is also very explicit (for example, slave_configure, etc.), but there are a number of companies that like to be slave have made numerous scsi low layer products, of which the more famous ones are: mpt3sas (lsi), pm8001 (pmc), qla2xxx (qlogic), etc. These goods are generally known as sas hba,raid card,fc hba, so there is no violence without flattery. They remember that when making hardware products, they must hold a thigh as thick as scsi, so that they will not be worried about selling it. But in recent years, scsi has not been so easy, because it is full of hierarchical scsi mid layer storage, which requires that all scsi deivce to dispatch cmd must be an interface to low layer. As a result, a single scsi host cannot give full play to all the performance of the new media nand flash, making the new protocol nvme popular, just like the hope that communism brings to the colonial comrades, and everyone wants to break through the cage of scsi host. So what is the fate of scsi, and whether it will be replaced by nvme in the future remains to be seen.

[this article is only posted by 51cto blogger "underlying Storage Technology" https://blog.51cto.com/12580077, official account release: storage Valley], if you need to reprint, please contact me, thank you.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report