From owner-cvs-all Mon Jan 20 20: 5:51 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB2F637B401; Mon, 20 Jan 2003 20:05:49 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90CA443EB2; Mon, 20 Jan 2003 20:05:49 -0800 (PST) (envelope-from hsu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h0L45nYm015101; Mon, 20 Jan 2003 20:05:49 -0800 (PST) (envelope-from hsu@repoman.freebsd.org) Received: (from hsu@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h0L45nnX015100; Mon, 20 Jan 2003 20:05:49 -0800 (PST) Message-Id: <200301210405.h0L45nnX015100@repoman.freebsd.org> From: Jeffrey Hsu Date: Mon, 20 Jan 2003 20:05:49 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_event.c 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 hsu 2003/01/20 20:05:49 PST Modified files: sys/kern kern_event.c Log: Rewrite the SMP filedesc locking in knote_attach() in order to 1. eliminate unnecessary loop which frees and re-allocates the just allocated array 2. eliminate the newsize recomputation 3. eliminate unnecessary unlock and relock around free 4. correctly match the free with the malloc into M_KQUEUE instead of M_TEMP 5. eliminate conditional assignment of oldlist, which is equivalent to a simple assignment 6. eliminate the oldlist temporary variable completely Reviewed by: jhb Revision Changes Path 1.53 +11 -23 src/sys/kern/kern_event.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message