[patch 6/6] staging: speakup: Migrate acntsa, bns, dectlk and txprt to ttyio

Samuel Thibault samuel.thibault at ens-lyon.org
Thu Mar 30 11:19:44 EDT 2017


Okash Khawaja, on jeu. 30 mars 2017 15:45:08 +0100, wrote:
> - in spk_ttyio_in:
>         - countdown for SPK_SERIAL_TIMEOUT usecs - similar to
> spk_serial_in - and check for atomic_read(&buf_free) == 0

Such busy polling will be way less acceptable than down_timeout :)
And all the more so since it does not actually try to give CPU to the
part of the kernel which will provide the character, while down_timeout
exactly does that.

> seems to be a somewhat less acceptance for timeout while acquiring
> locks. For example in case of mutex_lock_timeout:
> http://lkml.iu.edu/hypermail/linux/kernel/0611.3/0254.html.

Here we are not acquiring a lock: the down_timeout call is used to
try to consume a character, that's a very different thing than a
mutex_lock_timeout, which is indeed a very questionable thing.


More information about the Speakup mailing list