> right. This is one for you budding kernel ppl. My understanding of the
> kernel is minimal at best but if I remember correctly, there is a kernel
> wide spin lock available for SMP. The use of it is seriously evil becuase
> it forces the kernel uni-processor for short periods. but it's sometimes
> used as a start to making something SMP IIRC. As a starting cludge for SMP
> systems, could the spinlock not be used around each of the SBLive calls
> until finer locks were implemented?
>> If not - why not?
You can't. All code threads that need to synchronize
access to a given data structure _must_ agree on the
locks that they will use (and the order in which locks
are claimed if multiple locks are required). Otherwise,
it's as good as having no locks.
For example, if one sound driver was to use the kernel-wide
lock, then _all_ other code bits that use the same data
structures must use the same kernel-wide lock. I don't
know the code, but I imagine that this kind of dependency
could 'domino' around the kernel and end up requiring lots
more code to use the kernel-wide lock as well. This would
completely negate the benefits of finer-grained locking.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!