Date: Sun, 26 Mar 2000 09:53:21 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Doug Rabson <dfr@nlsystems.com> Cc: Alfred Perlstein <bright@wintelcom.net>, freebsd-current@FreeBSD.ORG Subject: Re: SMP/BGL patch 04 Message-ID: <200003261753.JAA32428@apollo.backplane.com> References: <Pine.BSF.4.21.0003261333440.89245-100000@salmon.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:I haven't looked at the patch so I can't comment on it (but it sounds very :promising). : :I have been writing some of the infrastructure for SMP on alpha and as an :experiment I've been using the mutex_t primitive from BSD/OS as an :experiment. This is a nice simple api for a counting mutex which BSD/OS :4.1 uses for its BGL. I have not yet seen the new BSD/OS smp code but it :seemed that using mutex_t might make it marginally easier to work with :that. : :-- :Doug Rabson Mail: dfr@nlsystems.com :Nonlinear Systems Ltd. Phone: +44 181 442 9037 Our BGL is essentially the same thing - a counting mutex with no special attributes (for example, it doesn't get fancy with cli/sti). I did a commit in Nov 99 which optimized the recursion case. It may not have been apparent from reading the code due to all the nasty CPU locking stuff that was in there (and now removed in my patchset). In FreeBSD we have two other sorts of SMP related locks: s_lock, and ss_lock. s_lock is a simple spinlock, ss_lock is a spinlock which disables interrupts. ss_lock is really crufty. The word 'bad' doesn't even begin to describe it. It is not recursive or nestable. It also will not apply at all when we move to interrupt threads. I've been removing ss_lock use in my SMP patch right and left and I'll probably remove the ss_lock code itself in patch-08. -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003261753.JAA32428>