- 
                Notifications
    
You must be signed in to change notification settings  - Fork 29
 
Support Logging for vmcall-raw feature #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
d419cc8    to
    1657771      
    Compare
  
            
          
                src/migtd/src/migration/session.rs
              
                Outdated
          
        
      | #[cfg(feature = "vmcall-raw")] | ||
| static NUM_VCPUS: AtomicU32 = AtomicU32::new(0); | ||
| 
               | 
          ||
| #[cfg(feature = "vmcall-raw")] | ||
| static LOGAREA_CREATED: AtomicBool = AtomicBool::new(false); | ||
| 
               | 
          ||
| #[cfg(feature = "vmcall-raw")] | ||
| static LOGAREA_INITIALIZED: AtomicBool = AtomicBool::new(false); | ||
| 
               | 
          ||
| #[cfg(feature = "vmcall-raw")] | ||
| static LOGENTRY_ID: AtomicU64 = AtomicU64::new(0); | ||
| 
               | 
          ||
| #[cfg(feature = "vmcall-raw")] | ||
| static MAXLOGLEVEL: AtomicU8 = AtomicU8::new(0); | ||
| 
               | 
          
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we create a data structure to include all logging related items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we create a data structure to include all logging related items?
I moved them into a data structure in logging.rs
| 
           Please clarify how you do the unit test. If you have covered all corner cases, including 
  | 
    
        
          
                src/migtd/src/migration/session.rs
              
                Outdated
          
        
      | #[cfg(feature = "vmcall-raw")] | ||
| pub fn create_logarea() -> Result<()> { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move all logging related feature to a separate log.rs file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move all logging related feature to a separate log.rs file?
sure jiewen, since session.rs uses existing crate log::, is it okay to rename the file to logging.rs? it would help resolve any future confusions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My recommendation is:
- Keep old sesson.rs.
 - Create a new logging.rs and put all logging related definition/function there.
 - The rest file just call the logging interface in logging.rs.
 
Signed-off-by: Gudaram, Meghana <[email protected]>
          
 On my end, I have run ~50 migrations with logging using loopback mechanism. Few migrations exhaust the circular buffer. I will look into adding unit test support in the logging.rs.  | 
    
No description provided.