[lkml]   [2001]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] 2.4.4 alpha semaphores optimization
On Fri, May 04, 2001 at 02:12:40PM -0700, Richard Henderson wrote:
> > - removed some mb's for non-SMP
> This isn't correct. Either you need atomic updates or you don't.
> If you don't, then you shouldn't be using ll/sc at all.

I don't think so. On a single CPU system we need atomic updates
to protect modifying of critical variables from interrupts, and
ll/sc sequences guarantee exactly that. But on UP system we don't
need memory barriers of any kind (I mean system memory space accesses,
not IO, of course), as we don't care about read/write ordering at all.

> If you do
> (perhaps to coordinate with devices) then the barriers are required.

For IO space access mb's are required, but ll/sc are of no use, AFAIK.

However, if I understand correctly, the r/w semaphores can't be used from
interrupt context, so in this case I'd agree -- this stuff could be made
completely non-atomic for UP.

> > - removed non-inline up()/down_xx() when semaphore/waitqueue debugging
> > isn't enabled.
> They should still be exported for module compatibility.

If you mean some external modules, then ok. The modules built from the
main tree shouldn't have any problems...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.097 / U:27.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site