-
Notifications
You must be signed in to change notification settings - Fork 31
Enable unified logging for Rust logging and memory logging for vmcall-raw. #678
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
4f53a45 to
201c16b
Compare
|
@mgudaram , please review as well. |
|
sure Jiewen, I will go over the changes. |
src/migtd/src/migration/logging.rs
Outdated
| 3 => LevelFilter::Info, | ||
| 4 => LevelFilter::Debug, | ||
| 5 => LevelFilter::Trace, | ||
| _ => LevelFilter::Info, // Handle cases where the u8 doesn't map to a valid Level |
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.
So, 0 will match Info?
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.
yes. Is that ok?
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.
Ok. Is that purposely? Or is it impossible case?
If former, why?
If latter, can we use panic() to ensure it will not happen?
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.
Ok. Is that purposely? Or is it impossible case? If former, why? If latter, can we use panic() to ensure it will not happen?
fixed
|
The changes look good to me. Just to summarize, it looks like the key-value pair will honor the concurrency and max loglevels for vmcall-raw interface are determined based on VMM's request for memory. |
| crypto = { path = "../crypto" } | ||
| futures-util = { version = "0.3.17", default-features = false } | ||
| lazy_static = { version = "1.0", features = ["spin_no_std"] } | ||
| log = { version = "0.4.29", features = ["kv", "release_max_level_off"] } |
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.
@mgudaram this is now removed. Instead, the --debug will be used. Is that ok?
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.
@mgudaram this is now removed. Instead, the --debug will be used. Is that ok?
![]()
We are probably thinking only from vmcall-raw point of view, but by removing "release_max_level_off" we might be enabling serial prints on release binary for other interfaces (like vmcall-vsock, virtio-vsock etc). IMO if we can isolate this change to only vmcall-raw, that would be ideal. @jyao1 please let me know your thoughts as well.
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.
or while building other interfaces, build option "log/release_max_level_off" can be leveraged to get the same behavior on release binary without needing any code changes.
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.
2fb40e6 to
feb7477
Compare
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
modified: src/migtd/src/ratls/server_client.rs
Add init_vmm_logger
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
modified: src/migtd/src/ratls/server_client.rs
Fix incorrect log format.
Remove unneccesary changes.
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
Bug fixes
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
release_max_level_off not needed anymore.
modified: src/migtd/Cargo.toml
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
Address PR comments.
modified: sh_script/Azure/Makefile
modified: src/migtd/Cargo.toml
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
Fix formatting.
modified: sh_script/Azure/Makefile
modified: src/migtd/Cargo.toml
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
Fix formatting.
modified: sh_script/Azure/Makefile
modified: src/migtd/Cargo.toml
modified: src/migtd/src/bin/migtd/main.rs
modified: src/migtd/src/migration/logging.rs
modified: src/migtd/src/migration/session.rs
feb7477 to
04862e4
Compare

This branch implements unified logging infrastructure for MigTD with support for structured, per-migration-request logging.
The PR addresses issues #571 and has the following changes -