Mark dma buffer readonly

valdis.kletnieks at vt.edu valdis.kletnieks at vt.edu
Wed Jan 31 14:39:16 EST 2018


On Thu, 01 Feb 2018 00:15:03 +0530, Rohan Puri said:

> See basic difference between mutex and spinlock is, the former puts the
> thread waiting on the lock to sleep and later does a busy wait.

> Since the nth bit is set every X ms, I think sleeping and waking up would
> turn out to be costly operations/overhead so no mutex. Spinlock would be
> good enough here.

Depends on the value of X and the amount of contention.  It's quite possible to
lock up an entire CPU or even more for a considerable amount of ms out of every
X using a spinlock.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180131/175288ce/attachment.sig>


More information about the Kernelnewbies mailing list