From owner-freebsd-smp Sat Mar 30 5:32:54 2002 Delivered-To: freebsd-smp@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 3251937B405; Sat, 30 Mar 2002 05:32:50 -0800 (PST) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.6) with SMTP id g2UDUmw80672; Sat, 30 Mar 2002 08:30:48 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sat, 30 Mar 2002 08:30:48 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Poul-Henning Kamp Cc: Matthew Dillon , John Baldwin , freebsd-smp@FreeBSD.ORG Subject: Re: Syscall contention tests return, userret() bugs/issues. In-Reply-To: <11416.1017476076@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Sat, 30 Mar 2002, Poul-Henning Kamp wrote: > In message <200203292207.g2TM7Fi67491@apollo.backplane.com>, Matthew Dillon wri > > > And do a compative syscall rate test on a two-cpu system running > > two getuid() processes, this happens: > > > > 1 process 2 processes > > w/PCPU: 1004000 1000000 > > w/++cnt.v_syscall: 1004000 853000 > > But is this a relevant test-case to optimize for ? > > We are trying to eliminate all often used trivial syscalls need to get > into the kernel in the first place, and for non-trivial syscalls it > doesn't matter a hoot how that increment is done... For builds, I would think that the really relevant test case might be a zero-byte loop-back pipe write / read pair. This would still be a single process, but would optimize handling of a system call that appears to be highly relevant to the build process. At least last I heard, Peter had identified pipe operations (pre-alfredpipe) as being one of the big issues in a parallel build due to make's use of pipes for IPC in frequent and small intervals. I don't know if he's run the numbers since then -- one benefit to moving the Giant grabbing to inside #ifdef ktrace would be that we might be able to do better benchmarking of the pipe case, which Alfred has told me hasn't improved much (possibly for this reason), if only in experimental code. That should demonstrate the performance impact of the fine-graind locking that we believe should be there. That said, if getuid as the example micro-benchmark can be demonstrated to causally affect optimize the macro-benchmark, then the selection of micro-benchmark by implementation facility sounds reasonable to me. :-) Matt's original post used 1-process and 2-process build pairs in a macro-benchmark style, so I imagine all is set on that front, since he'd demonstrated that related contention existed in that path, and done experimentation instrumentation that noted a similar performance impact in the macro-benchmark from the micro-benchmark. Before commit time comes, clearly the macros need to run and demonstrate happiness, of couse. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message