Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 1999 12:21:55 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Alfred Perlstein <bright@wintelcom.net>, Charles Randall <crandall@matchlogic.com>, freebsd-smp@FreeBSD.ORG
Subject:   Re: Big Giant Lock progress? 
Message-ID:  <19991119042155.1D6711CA0@overcee.netplex.com.au>
In-Reply-To: Your message of "Thu, 18 Nov 1999 08:43:45 PST." <199911181643.IAA85662@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> :Fifth:
> :It's also very important that the scheduler becomes MP safe.
> 
>     I forgot that one.  Yes, absolutely.
> 
> :>     we can do any of this stuff, though.  A previous
> :>     attempt to optimizing just #3 in uiomove did not
> :...
> :
> :I wasn't around when this was attempted, did the code only
> :touch the BGL when the amount to copy was greater than let's
> :say 2k?  Or was the bgl toggled on every uiomove?
> 
>     BDE tried his hand at this and spent a few minutes working
>     up a simple patch that essentially turned off the bgl
>     during the uiomove and then turned it back on again.  I
>     messed around with it for a while and ran a bunch of tests
>     and just didn't get the expected performance improvement.
>     I think there was a lock inversion problem too but I'm not
>     sure.
> 
>     I concluded that the problem was that there were too many
>     other places in the code path that held the BGL and turning
>     it off in that one place was not sufficient.
> :
> :It'd be great to get that code committed asap, it's really a keen
> :observation and the benefit are immediate and un-obtrusive.
> :
> :-Alfred
> 
>     Ok, I will.  I have put the adjusted patch up for a final
>     review at:
> 
> 	http://www.backplane.com/FreeBSD4/
> 
> 	in the second section 'SMP PatchSet ....', the file is:
> 
> 	http://www.backplane.com/FreeBSD4/smp-patch-02.diff
> 
>     I've been running the patch for several weeks without
>     any problem.

I have a problem with this portion of the smp-patch-02.diff:

Index: sys/lock.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/lock.h,v
retrieving revision 1.16
diff -u -r1.16 lock.h
--- lock.h      1999/08/28 00:51:50     1.16
+++ lock.h      1999/11/18 08:22:37
@@ -208,4 +208,15 @@
 #endif /* NCPUS == 1 */
 #endif /* !SIMPLELOCK_DEBUG */
 
+#ifdef SMP
+void get_mplock(void);
+void rel_mplock(void);
+#define GET_SYSCALL_LOCK       get_mplock()
+#define REL_SYSCALL_LOCK       rel_mplock()
+#else /* !SMP */
+#define GET_SYSCALL_LOCK
+#define REL_SYSCALL_LOCK
+#endif /* SMP */
+
+
 #endif /* !_LOCK_H_ */

This appears to be unrelated to the MPgetlock etc code so it may not be
intended to be there.  However, the problem is that it looks like it's
exposing more "#ifdef SMP" to modules..  This is a problem if we have to
have a SMP vs non-SMP set of modules for 4.0-RELEASE, especially for things
like OSS.  Obviously I haven't seen the code, but please keep this in mind.

Cheers,
-Peter



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991119042155.1D6711CA0>