From owner-freebsd-smp Fri Mar 22 8:32:52 2002 Delivered-To: freebsd-smp@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 62A0B37B417; Fri, 22 Mar 2002 08:32:48 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g2MGWlY61491; Fri, 22 Mar 2002 08:32:47 -0800 (PST) (envelope-from dillon) Date: Fri, 22 Mar 2002 08:32:47 -0800 (PST) From: Matthew Dillon Message-Id: <200203221632.g2MGWlY61491@apollo.backplane.com> To: John Baldwin Cc: smp@FreeBSD.ORG Subject: Re: Giant instrumentation References: Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org :> I know I'm being harsh here, but that is my opinion. : :Er, instead of adding s = mtx_lock_giant()/mtx_unlock_giant() along with having :to possibly rework logic of code, you just add "foo" to a line in :syscalls.giantvars. This is hard? The main difference here is that the :instrumentation code no longer impacts the actual syscall source code thus :keeping the actual syscall code cleaner. Also, in your current implementation :you encourage both safe and unsafe code to be under the sysctl variables :meaning that we can't actually get Giant out from under a subsystem until the :whole thing is done preventing us from incrementally moving things out from :under Giant. : :-- : :John Baldwin <>< http://www.FreeBSD.org/~jhb/ First of all, what is this 'possibly rework logic of code' crap? mtx_lock_giant() is no different then what you are doing, except that it's far more obvious to the programmer and far more flexible. I don't encourage anything with this code, it's flexibility is there in case it is needed. That is not encouragement. What you believe to be a plus... hiding the instrumentation from the programmer, I believe to be a strong negative. There is no point in doing the instrumentation at all unless the programmer playing with the syscall code knows what it is doing in the context of whatever he is working on. This code forces the programmer to keep multiple source files open just to see what the hell is going on with a syscall. My code makes the instrumentation extremely plain and obvious without the programmer having to reference multiple source files. It sure as hell does NOT make the syscall code dirty! It makes it more understandable. That isn't dirty. What you believe to be making the syscall code 'clean' is actually obfuscating it instead, make it less effective and less flexible. You also seem to believe that a mere two lines of code in a syscall somehow makes it more difficult for the programmer. You are, and I've seen this before, equating lines of code with difficultly. It is a complete absurd notion to equate lines of code with difficulty. In short, syscalls.giantvars is a bad idea and a hinderance to development rather then an aid. I have no interest whatsoever in it and I am not particularly interested in seeing people rip out my mtx_lock_giant() code and replace it with this junk. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message