ingram14
原博客地址:https://blog.csdn.net/wangpeng22

NVMe Directive 协议相关:

       首先Directive 分为Directive Receive command 和 Directive Send command, 顾名思义Directive Send command用于从host trans data 到 device,Directive Receive command反之。

 

Directive传送的资料和Directive相关(这不是废话么)。

        Directive传送的资料主要分两种类型,Identify和Streams; 

               1)identify类型,Directive相关信息(包含Streams Directive support相关,Directive/Streams enable之类的)。

               2 ) Streams类型,

                                       a.Directive Receive command,  包含Return Parameters、Get Status、Allocate Resources。

                                                    Return Parameters: 获取Max Streams Limit,NVM Subsystem Streams Available、NVM Subsystem Streams Open等等。 

                                                    Get Status: Open Stream Count, open stream id等。

                                                    Allocate Resources:指定host分配给namespace独占stream numbers,及共享stream numbers。

                                       b.Directive Send command,包含Release Identifier、Release Resources。

 

NVMe Directive 应用:

       废话不多说,关键是directive怎么应用?

  从SSD firmware架构来看,Directive streams会增加不小冲击,原因是host会给不同的数据打上不同的stream id,hot ? cold?large?small?,而且会贯串Firmware前中后,并且给ftl的处理增加巨大难度;那么如何设计NVMe Directive streams才合理呢?

首先要支持streams,最后host与device达成一致,即stream id定义一致,stream id count一致,不宜复杂。

       比如只支持2个stream,id = 1表示small data,id = 2表示large data,那么后端可以开辟两个super block去分别存储small data or large data。

       再比如只支持2个stream,id = 1表示hot data,id = 2表示cold data,那么后端可以把super block分成两类分别用来存储hot data or cold data。

 

 

NVMe Directive用处:

      stream 主要提升 garbage collection 算法的性能,降低SSD写放大,从而提高 SSD 的有效生命周期。

 

posted on 2022-01-22 22:08  ingram14  阅读(1764)  评论(0编辑  收藏  举报