天天看點

nvme1.3 Feature - Telemetry

8.14 Telemetry

遙測技術使制造商能夠收集内部資料日志,以改善産品的功能和可靠性。遙測資料的收集可以由Host或者Controller進行發起。遙測資料以Telemetry Host-Initiated log page or the Telemetry Controller-Initiated log page (refer to section5.14.1.7 and 5.14.1.8)的形式被傳回到Host。抓取的資料由廠商自定義。遙測功能定義了收集廠商特定資料的機制。Controller可以Identify Controller中的Log Page Attribute中聲明此支援。

通過收集遙測資料來發現問題的一個非常重要的方面是有能力限定不同的問題。建立問題到資料的一對一映射時最基本的。如果未建立一對一映射,則存在以下風險:幾個有效負載集合看起來是不同的,但實際上都是由同一問題引起的。相反,單個有效載荷集合可能具有由多個問題混合在一起而導緻的有效載荷,進而在确定根本原因方面造成了額外的複雜性。是以,在手機遙測資料的大小上時非常靈活的,通常使用三段資料。

第一個階段确定問題存在并通過收集最少的資料來完成不同問題的區分。一旦實際問題數量得到确定,另一個階段就很有必要取收集實際資訊。在第二階段,收集并分析有針對性的更深入的中等大小的資料,以找出問題的根源。對于不常見問題,無法通過第一第二階段的遙測資料得出原因的,可以使用第三階段遙測資料來診斷這個問題。

對于這兩種遙測資料的定義,每種遙測資料Log由一組Telemetry Data Blocks組成。每個Telemetry Data Block為512Byte。每個遙測資料Log被分為三個遙測資料區域。所有的遙測資料區域起始都在Telemetry Data Block 1。每個遙測資料區域都應當代表了在擷取遙測資料時Controller的内部狀态。

每個遙測資料區都旨在捕獲更豐富的資料集,以幫助解決問題。遙測資料區域1旨在具有較小的有效載荷(即第一階段),遙測資料區域2旨在具有中等尺寸的有效載荷(即第二階段),而遙測資料區域3旨在具有較大有效載荷(即第三階段)。每個遙測資料區域的大小在收集遙測資料時根據廠商自定義的。也有可能Host會檢索出所有三個遙測資料區域來進行更好的分析問題。

Host-Initiated和Controller-initiated遙測資料的準備,收集和送出是相似的。 主要差別在于觸發收集的因素。對于遙測資料收集的操作過程如下:

  1. Host使用Identifies Controller Data中的資料判斷Temeletry是否支援。
  2. 如果需要的話,Host準備一塊區域去存放Telemetry資料。
  3. 接收Controller-Initiated Telemetry Data的通知資訊,Host使能異步事件配置中的Telemetry Log Notices(參見5.21.1.11節)。
  4. 如果Host決定去收集Host-Initiated遙測資料或者Controller通知Host Controller-Initiated遙測資料是可獲得的:
  1. Host讀Telemetry Data Area。也可能host會收集Telemetry Data Area 1,2和3。當讀到Controller-Initiated Log的最後一部分時,Host會将Get Log Page中的Retain Asynchronous Event清0。
  2. 如果是Controller-Initiated Log,Host會重讀Log Page的Header來确信Telemetry Controller-initiated Data Generation Number和讀到的原始值比對。如果不比對,那麼資料擷取是不連貫,需要重讀Log。
  3. 當所有遙測資料都被儲存後,這個資料應當被發送給Controller的廠商。

典型的Host-Initiated資料收集的觸發條件是System Crash。但也可能是在正常的操作期間發起的。Host下發Get Log Page - Host-Initiated指令時,會将Create Telemetry  Host-Initiated Data bit置為1.Controller應當快速完成這個指令(例如:小于1秒)來避免在收集到Telemetry Data之前使用者重新開機了系統。

Controller會使用異步事件通知Host去收集Controller-Initiated遙測資料。Host也可以通過Telemetry Host-initiated或者Telemetry Controller-initiated中的Telemetry Controller-initiated Data Available字段來決定可不可以擷取Telemetry Controller-initiated Data。一旦Host開始讀取Telemetry Data,Controller應當避免修改Controller-initiated資料,知道host完成了所有Controller-Initiated資料的讀取。

當Controller替代了新的Controller-Initiated Data時,Controller應當增加Telemetry Controller-Initiated Data Generation Number字段。Host需要确認Telemetry Controller-Initiated Data Generation Number字段在開始擷取資料和結束擷取之間沒有更改,以保證資料的連續性。

8.14.1 Telemetry Data Collection Examples (Informative)

This section includes several examples of Telemetry Host-Initiated Data Areas for illustration. The same

concepts apply to the Telemetry Controller-Initiated Data Areas.

If a Telemetry Host-Initiated log page has no data for collection, then the following fields are all cleared to 0h:

  1. Telemetry Host-Initiated Data Area 1 Last Block = 0;
  2. Telemetry Host-Initiated Data Area 2 Last Block = 0; and
  3. Telemetry Host-Initiated Data Area 3 Last Block = 0.

When all three telemetry data areas are populated, then the Telemetry Host-Initiated log page has different

values in each of the Telemetry Host-Initiated Data Area n Last Block fields. For example, the following values correspond to the layout shown in Figure 478:

  1. Telemetry Host-Initiated Data Area 1 Last Block = 65;
  2. Telemetry Host-Initiated Data Area 2 Last Block = 1,000; and
  3. Telemetry Host-Initiated Data Area 3 Last Block = 30,000.

As a result of telemetry data areas being made up of a single set of Telemetry Data Blocks starting at

Telemetry Data Block 1, the telemetry data contained in Telemetry Data Block 1 through Telemetry Data

Block 65 of data area 1, data area 2, and data area 3 is the same. In addition, the telemetry data contained

in Telemetry Data Block 66 through Telemetry Data Block 1,000 of data area 2 and data area 3 is the same.

nvme1.3 Feature - Telemetry

When only the second data areas is populated, then the Telemetry Host-Initiated log page has no data in

Telemetry Data Area 1 shown by having its corresponding last block value cleared to 0h, and no additional

data in Telemetry Data Area 3 shown by having its corresponding last block value set to the same value as

the last block value for Telemetry Data Area 2. For example, the following values correspond to the layout

shown in Figure 479:

  1. Telemetry Host-Initiated Data Area 1 Last Block = 0;
  2. Telemetry Host-Initiated Data Area 2 Last Block = 1,000; and
  3. Telemetry Host-Initiated Data Area 3 Last Block = 1,000.

As a result of telemetry data areas being made up of a single set of Telemetry Data Blocks starting at

Telemetry Data Block 1, the telemetry data contained in Telemetry Data Block 1 through Telemetry Data

Block 1,000 of data area of data area 2 and data area 3 is the same.

nvme1.3 Feature - Telemetry

繼續閱讀