From owner-freebsd-arch Sat Feb 16 13:15:33 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 91A6037B404; Sat, 16 Feb 2002 13:15:30 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1GLFSe32349; Sat, 16 Feb 2002 13:15:28 -0800 (PST) (envelope-from dillon) Date: Sat, 16 Feb 2002 13:15:28 -0800 (PST) From: Matthew Dillon Message-Id: <200202162115.g1GLFSe32349@apollo.backplane.com> To: Poul-Henning Kamp , arch@FreeBSD.ORG, jhb@FreeBSD.ORG, peter@wemm.org, jake@locore.ca Subject: timing results for gettimeofday() (without any credential fixes) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG CURRENT 2xCPU SMP BUILD Original gettimeofday() code one TG running: 350000/sec two TGs running: 55000/sec per TG (no, that isn't a type-o) CURRENT 2xCPU SMP BUILD W/Giant removed from gettimeofday() one TG running: 375000/sec two TGs running: 301000/sec per TG (due to ucred Giant issues) (tests run on 2xCPU 1.2 GHz DELL2550's) With crhold()/crfree() also fixed I would expect both TG's to operate at at least 350K calls/sec. This just goes to show how badly cache mastership changes can mess up high-performance procedure calls. Holding Giant in the original code dropped performance by a factor of 10, far more then the factor of 2 it ought to have dropped it by. L1 Cache mastership changes are almost certainly to blame. In contrast, the same machine running stable: STABLE 2xCPU SMP BUILD (note gettimeofday() on stable is marked MPSAFE): one TG running: 192402/sec two TGs running: 95900/sec I'm not sure what is going on in stable, because gettimeofday() is in fact marked MPSAFE. I think it may be the scheduler doing something weird. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message