-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
project-kernelRelated to the kernelRelated to the kerneltype-perfThis is a performance regression/potential improvementThis is a performance regression/potential improvement
Description
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... 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.?&Write
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
project-kernelRelated to the kernelRelated to the kerneltype-perfThis is a performance regression/potential improvementThis is a performance regression/potential improvement