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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

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.

Samuel
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux