From owner-freebsd-smp Wed Dec 4 22:27:00 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.8.3/8.7.3) id WAA17735 for smp-outgoing; Wed, 4 Dec 1996 22:27:00 -0800 (PST) Received: from friley216.res.iastate.edu (friley216.res.iastate.edu [129.186.78.216]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA17730 for ; Wed, 4 Dec 1996 22:26:58 -0800 (PST) Received: from friley216.res.iastate.edu (loopback [127.0.0.1]) by friley216.res.iastate.edu (8.8.3/8.7.3) with ESMTP id AAA03220 for ; Thu, 5 Dec 1996 00:26:57 -0600 (CST) Message-Id: <199612050626.AAA03220@friley216.res.iastate.edu> X-Mailer: exmh version 1.6.9 8/22/96 To: freebsd-smp@freebsd.org Subject: make locking more generic? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 05 Dec 1996 00:26:56 -0600 From: Chris Csanady Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Could we possibly make our global semaphore a bit more generic? I guess this is what I had in mind.. It would allow us to create more locks. We could then easily give the run queues their own lock. This would be a fairly large win for a cpu bound workload I believe. Instead of having kernel entry block, when the kernel is running on another cpu, we could immediately switch to another process and do something useful. This would all be quite simple to implement, imho. We would then also be able to move the global kernel entry lock out into the syscalls, and further fan out the lock structure from there. This is something that I'd like to work on soon. :) The reason I was wanting the spin locks earlier was that to move the locks into the syscalls, we would need to make the interrupt, trap, and exception code re-entrant. I think this would be fairly trivial, and properly done with a few spin locks. Although, using semaphores would work fine as for now--and actually I think some of it was in place last time i checked. If you like, I could submit some patches for the global lock changes. I think I understand enough assembly now to get that right, although anyone else is more than welcome to do it.. :) --Chris Csanady