lkml.org 
[lkml]   [2006]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Why Semaphore Hardware-Dependent?
Date
Christoph Lameter <clameter@sgi.com> wrote:

> > Some of these have LL/SC or equivalent instead, but ARM5 and before, FRV,
> > M68K before 68020 to name but a few.
>
> This is all pretty ancient hardware, right? And they are mostly single
> processor so no need to worry about concurrency. Just disable interrupts.

No, they're not all ancient h/w, and "just disabling interrupts" can be really
expensive.

> > And anything that implements CMPXCHG with spinlocks is a really bad
> > candidate for CMPXCHG-based rwsems.
>
> Those will optimize out if it is a single processor configuration.

Not necessarily. Consider preemption.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-29 19:03    [from the cache]
©2003-2011 Jasper Spaans