From owner-freebsd-arch@freebsd.org Sun Oct 29 02:19:36 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABFAAE56002 for ; Sun, 29 Oct 2017 02:19:36 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22251668A1 for ; Sun, 29 Oct 2017 02:19:35 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a398f57b-bc4f-11e7-a938-4f970e858fdb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id a398f57b-bc4f-11e7-a938-4f970e858fdb; Sun, 29 Oct 2017 02:19:49 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9T2JRi1002184 for ; Sat, 28 Oct 2017 20:19:27 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1509243567.56824.103.camel@freebsd.org> Subject: Allow faster eventhandler dispatching by keeping pointers to handler lists. From: Ian Lepore To: "freebsd-arch@FreeBSD.org" Date: Sat, 28 Oct 2017 20:19:27 -0600 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2017 02:19:36 -0000 There has been some talk lately of the kernel eventhandler mechanism being inefficient due to holding a lock while walking a global list doing strcmp() to find the right list of handlers.  I've posted a phabricator review to alleviate that by allowing high-frequency events to pre-define the event list and keep a pointer to it, to avoid the name lookups. https://reviews.freebsd.org/D12821 -- Ian