Re: Mark dma buffer readonly

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

 



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.

Attachment: pgpujt93YfcUu.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux