Skip to content
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

Async Serial Logger #532

Open
kitlith opened this issue Oct 28, 2019 · 2 comments
Open

Async Serial Logger #532

kitlith opened this issue Oct 28, 2019 · 2 comments
Labels
project-kernel Related to the kernel type-perf This is a performance regression/potential improvement

Comments

@kitlith
Copy link
Contributor

kitlith commented Oct 28, 2019

Currently, SerialLogger is sync. @Orycterope estimates that "serial is like 80% of why sunrise is slow" because of this.

However, we print really early on in boot, even before the scheduler is active. So, we don't have much of an option but to do sync printing at that point. It's probably also a good idea not to rely on the scheduler when a kernel panic occurs. So, I propose having two serial drivers: the current one, only used for boot and panic, and an async one used for normal system functioning.

This requires some additional consideration, such as:

  • On panic, we don't want to lose the buffer of the async logger. We should make sure to use the sync logger to flush the buffer.
  • We want a(n easy) way to switch between these loggers. I suggest some sort of static that holds a &Write... wait we need it to be mutable, and i don't know how well a mutable reference would work as a static :/ maybe an Arc/RwLock/etc.?
@Orycterope
Copy link
Member

80% is a figure of speech, We've never actually measured it 😅

But yeah !

@kitlith
Copy link
Contributor Author

kitlith commented Oct 28, 2019

yeah i figured. you "estimated" it 😄

@roblabla roblabla added project-kernel Related to the kernel type-perf This is a performance regression/potential improvement labels Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-kernel Related to the kernel type-perf This is a performance regression/potential improvement
Projects
None yet
Development

No branches or pull requests

3 participants