RDC module framework
The framework is required for RAS integration. When the RAS fields need to be retrieved, the framework will load the RAS library at run time, and then call the RAS function to retrieve RAS metrics. * The RdcModuleMgr will be used to manage different modules. RDC only has the telemetry module now. * When RDCTelemetryModule is loaded, it will load the RAS library. It will also call rdc_telemetry_fields_query() defined in the RAS library for the list of fields RAS supported. * The RdcSmiLib is a wrapper for the rocm_msi_lib to provide the interface required by the RDCTelemetryModule. * The RdcWatchTable will use the RdcModuleMgr to get the RDCTelemetryModule to bulk fetch mulitple fields. * The RdcTelemetryModule will dispatch those fields to different library: RdcSmiLib or RdcRasLib. The watch() and unwatch() in the RDCTelemetryModule will been implemented at the next task. Change-Id: I81b01d5b52d1ea3cdcec7c09af86b6622dd5899e
Ta zmiana jest zawarta w:
%! (template.HTML=
Bill(Shuzhou) Liu)złożyło 2020-09-02 14:46:40 -04:00
1 rodzic
bf412e3f76
złożenie
ba35cdcfe2
19 plików zmienionych
+934
-72
Żadne pliki nie pasują do Twojego wyszukiwania
@@ -29,11 +29,11 @@ THE SOFTWARE.
|
||||
#include <memory>
|
||||
#include <mutex> // NOLINT
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include "rdc_lib/RdcWatchTable.h"
|
||||
#include "rdc_lib/RdcGroupSettings.h"
|
||||
#include "rdc_lib/RdcCacheManager.h"
|
||||
#include "rdc_lib/RdcMetricFetcher.h"
|
||||
#include "rdc_lib/RdcModuleMgr.h"
|
||||
#include "rocm_smi/rocm_smi.h"
|
||||
|
||||
namespace amd {
|
||||
@@ -83,9 +83,11 @@ class RdcWatchTableImpl : public RdcWatchTable {
|
||||
//!< once per second.
|
||||
rdc_status_t rdc_field_update_all() override;
|
||||
|
||||
// TODO(bill_liu): Remove the RdcMetricFetcherPtr
|
||||
RdcWatchTableImpl(const RdcGroupSettingsPtr& group_settings,
|
||||
const RdcCacheManagerPtr& cache_mgr,
|
||||
const RdcMetricFetcherPtr& metric_fetcher);
|
||||
const RdcMetricFetcherPtr& metric_fetcher,
|
||||
const RdcModuleMgrPtr& module_mgr);
|
||||
|
||||
private:
|
||||
//!< Helper function to Update the fields_in_table when unwatch tables
|
||||
@@ -108,9 +110,14 @@ class RdcWatchTableImpl : public RdcWatchTable {
|
||||
|
||||
rdc_status_t initialize_rsmi_handles(RdcFieldKey fk);
|
||||
|
||||
//!< The function will be pass as the callback for bulk fetch
|
||||
static rdc_status_t handle_fields(rdc_gpu_field_value_t* values,
|
||||
uint32_t num_values, void* user_data);
|
||||
|
||||
RdcGroupSettingsPtr group_settings_;
|
||||
RdcCacheManagerPtr cache_mgr_;
|
||||
RdcMetricFetcherPtr metric_fetcher_;
|
||||
RdcModuleMgrPtr rdc_module_mgr_;
|
||||
|
||||
//!< The watch table to store the watch settings.
|
||||
std::map<RdcFieldGroupKey, FieldSettings> watch_table_;
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika