You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to maintain multiple batch contexts for MSRIO was introduced in PR #2972. This PR also modified the MSRIOGroup's in-memory version of save_control() to leverage the new batch context tracking by introducing m_save_restore_ctx. This version of save_control() is only ever called by the Controller during Controller::run(). This call will only ever get into the MSRIOGroup if the end-user has direct access to the MSR or msr-safe file descriptors (which is only possible presently if the user has CAP_SYS_ADMIN).
During "normal" expected operation where the end-user does not have direct access to manipulate MSRs, all of that I/O happens through the ServiceIOGroup instead. When the user initiates a new session, and that session is a write_mode() session, pio.save_control_dir() is invoked from service.py. This API ultimately calls into the file-based version of MSRIOGroup::save_control(const std::string path). This file-based version utilizes the SaveControl object which ultimately uses read_signal() to determine the value to "save" initially.
This all became apparent through the investigation of #3352.
The following needs to be changed in order for SaveControl to utilize the batch context tracking:
SaveControl needs to have a way to issue read_batch and sample either through the existing m_save_restore_ctx or a new one. Presently in MSRIOGroup, this is done through direct access to the MSRFieldControl objects that are contained within m_control_available. The MSRFieldControl objects have a save() method which calls sample() and stores the result in a class member. This could somehow be exposed for SaveControl to query. This could be done by making SaveControl a friend of MSRIOGroup, and making m_control_available protected instead of private.
A better solution would be to plumb the batch context through the IOGroup interface so that this wouldn't be a one-off solution just for the MSRIOGroup.
This is a good topic for an architecture meeting as multiple solutions are possible.
The text was updated successfully, but these errors were encountered:
The ability to maintain multiple batch contexts for MSRIO was introduced in PR #2972. This PR also modified the MSRIOGroup's in-memory version of save_control() to leverage the new batch context tracking by introducing
m_save_restore_ctx
. This version of save_control() is only ever called by theController
duringController::run()
. This call will only ever get into the MSRIOGroup if the end-user has direct access to the MSR or msr-safe file descriptors (which is only possible presently if the user has CAP_SYS_ADMIN).During "normal" expected operation where the end-user does not have direct access to manipulate MSRs, all of that I/O happens through the ServiceIOGroup instead. When the user initiates a new session, and that session is a write_mode() session,
pio.save_control_dir()
is invoked from service.py. This API ultimately calls into the file-based version ofMSRIOGroup::save_control(const std::string path)
. This file-based version utilizes theSaveControl
object which ultimately usesread_signal()
to determine the value to "save" initially.This all became apparent through the investigation of #3352.
The following needs to be changed in order for SaveControl to utilize the batch context tracking:
read_batch
andsample
either through the existingm_save_restore_ctx
or a new one. Presently in MSRIOGroup, this is done through direct access to theMSRFieldControl
objects that are contained withinm_control_available
. TheMSRFieldControl
objects have asave()
method which callssample()
and stores the result in a class member. This could somehow be exposed forSaveControl
to query. This could be done by making SaveControl a friend of MSRIOGroup, and makingm_control_available
protected instead of private.This is a good topic for an architecture meeting as multiple solutions are possible.
The text was updated successfully, but these errors were encountered: