From owner-cvs-all Thu Jun 6 13:51:13 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D9DF437B404; Thu, 6 Jun 2002 13:51:04 -0700 (PDT) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g56Kp4d27704; Thu, 6 Jun 2002 13:51:04 -0700 (PDT) (envelope-from jhb) Message-Id: <200206062051.g56Kp4d27704@freefall.freebsd.org> From: John Baldwin Date: Thu, 6 Jun 2002 13:51:04 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_witness.c src/sys/sys _lock.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2002/06/06 13:51:04 PDT Modified files: sys/kern subr_witness.c sys/sys _lock.h Log: Change the all locks list from a STAILQ to a TAILQ. This bloats struct lock_object by another pointer (though all of lock_object should be conditional on LOCK_DEBUG anyways) in exchange for an O(1) TAILQ_REMOVE() in witness_destroy() (called for every mtx_destroy() and sx_destroy()) instead of an O(n) STAILQ_REMOVE. Since WITNESS is so dog slow as it is, the speed-up is worth the space cost. Suggested by: iedowse Revision Changes Path 1.118 +6 -6 src/sys/kern/subr_witness.c 1.7 +1 -1 src/sys/sys/_lock.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message