This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Coldfire __lll_lock fails under heavy system stress
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ed Slas <ed_slas at yahoo dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>
- Date: Thu, 1 Nov 2012 16:51:55 +0000
- Subject: Re: Coldfire __lll_lock fails under heavy system stress
- References: <1351715016.75654.YahooMailNeo@web161606.mail.bf1.yahoo.com> <Pine.LNX.4.64.1210312041440.31881@digraph.polyomino.org.uk> <1351781813.79652.YahooMailNeo@web161605.mail.bf1.yahoo.com>
On Thu, 1 Nov 2012, Ed Slas wrote:
> Thanks for your time. I understand the kernel's atomic_cmpxchg_32() is
> most likely the issue, but note that most of the other platforms use a
> atomic lock in user space, then resort to the kernel to arbitrate
> contentions. The Coldfire port makes the?atomic_cmpxchg_32 kernel call
> first, when there is a user space atomic lock available (TAS
> instruction).
I don't believe TAS is sufficient to implement a general
compare-and-exchange operation, such as is expected by NPTL. The syscall
is used because the ColdFire architecture has neither an atomic
compare-and-exchange instruction, nor load-locked / store-conditional that
are used on some other architectures to implement compare-and-exchange in
userspace.
--
Joseph S. Myers
joseph@codesourcery.com