No. It will update the screen for every character/newline printed. But
stdout in C is line-buffered by default, so only full lines get sent to the
console (if we are talking about userspace).




If there is an inherent problem in updating a graphical console in Qemu, it
should affect Linux graphical console too. Maybe you should try running a 
linux with graphical console in your Qemu and try to compare the results. If
the problem does not occur with Linux, might be good idea to investigate 
exactly what the difference is.





Cheers,

Jiri

---------- Původní e-mail ----------
Od: Martin Decky <[email protected]>
Komu: [email protected]
Datum: 10. 11. 2023 10:20:59
Předmět: Re: [HelenOS-devel] Kernel framebuffer bottlenecks
"BTW: One optimization that the Linux kernel console is probably doing is 
not necessarily drawing and scrolling on every new line of output, but
only on an explicit flush.

It is common that most run-time environments flush on a newline (when
writing to stdout), but not necessarily on every newline, but maybe only 
on the last newline of the given print statement.

Maybe this is a way to do some cheap and conservative optimizations for 
our kernel console as well, at the expense of some output buffering on
the "stdout" side in the kernel. Of course, critical kernel messages
need to be printed in the "stderr" style with implicit flushes after
every character like now.

I'm not sure how much would this actually help and whether it is worth
the complications.


M.D.

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel
"
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to