[Bugs] [Bug 1306807] use mutex on single core machines
bugzilla at redhat.com
bugzilla at redhat.com
Thu Mar 17 13:55:54 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1306807
--- Comment #8 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/13432 committed in master by Jeff Darcy
(jdarcy at redhat.com)
------
commit 7e44c783ad731856956929f6614bbe045c26ea3a
Author: Prasanna Kumar Kalever <prasanna.kalever at redhat.com>
Date: Thu Feb 11 23:45:37 2016 +0530
lock: use spinlock only on multicore systems
Using spinlocks on a single-core system makes usually no meaning,
since as long as the spinlock polling is blocking the only available
CPU core, no other thread can run and since no other thread can run,
the lock won't be unlocked until its time quantum expires and it gets
de-scheduled. In other words, a spinlock wastes CPU time on those
systems for no real benefit. If the thread was put to sleep instead,
another thread could have ran at once, possibly unlocking the lock and
then allowing the first thread to continue processing, once it woke up
again.
Change-Id: I0ffc14e26c2e150b564bcb682a576859ab1d1872
BUG: 1306807
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever at redhat.com>
Reviewed-on: http://review.gluster.org/13432
Smoke: Gluster Build System <jenkins at build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=4mnFqxqkEE&a=cc_unsubscribe
More information about the Bugs
mailing list