Hi, On Thu, Feb 09, 2023 at 11:53:00AM +0100, Alexander Kanavin wrote: > On Thu, 9 Feb 2023 at 10:36, Mikko Rapeli <mikko.rap...@linaro.org> wrote: > > I think sleep() is ok in this case to reduce busy looping over serial > > console and read() more data than what select() initially saw. Reading > > single character at a time is a bit silly and just wastes CPU time when > > we don't need ms level accuracy. > > Something doesn't compute here. The writer should be sending data in > chunks, and there are buffers all the way to the reader, so where does > the splitting into single characters happen?
Sorry I mixed with the serial console patch, but the output was similar over ssh. select() returns with any data, even single character. Fancy readers will read larger chunks but will read more data than is available and thus block for ever. Plain read() will read the data which is available from select() and thus really small amounts like single characters if that's available over the socket. This is visible in the partial read output of do_testimage() task output log which becomes quite unreadable without change. Cheers, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#176944): https://lists.openembedded.org/g/openembedded-core/message/176944 Mute This Topic: https://lists.openembedded.org/mt/96849157/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-