From owner-freebsd-arch@freebsd.org Sun Oct 29 03:00:48 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 9FA72E56C1E for ; Sun, 29 Oct 2017 03:00:48 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-pg0-f41.google.com (mail-pg0-f41.google.com [74.125.83.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBCE677A1; Sun, 29 Oct 2017 03:00:48 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-pg0-f41.google.com with SMTP id y5so8336763pgq.7; Sat, 28 Oct 2017 20:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=vaWWAddJv1iK8Wiq4TUAmxc4Ytk4AaxMNoJdp0kss14=; b=QBuqoj2bvdNdlqIDV6hl3IMz1Xg2EBp1iqjZjKiKHML/zUD7M7Fg2XwAUzRX+lw/cT 3nW2y7rJ1URJIO91MkJg50e8B6a5S+puWuNMw6Ktfu1lEZGBwoRcHsPNnBdcgo3Nzz8a 82ZOkx7MKRt52b3jmWIC/8J2bXn1nSoU4mj3QQAsu4oNV6Xe8DtfjI78nlHkmc8wkrWu Mt4gIQyGsIJJf6mayUDRnyJ5kmOi97x5IZgwV1D5USHtwztPlATL09X8Fn2CcXYi0gV1 kQd2QKmnK26NA+zQOEN4uLyod29uQeeAb28Bv3lgdWcDXKMrutyGRkMuNZ/R16QPGHbf FSTw== X-Gm-Message-State: AMCzsaXry7vkrGV9A2i1j6Vc0q7l+dNWYnN0IgYajNoZlXWQBIVocF/k t0q3w/Ugh5jmaLf232nPmj9nKw2G X-Google-Smtp-Source: ABhQp+S5HslC4PmVpcEsVPtiYv0Wm9c/B4lJmUURnyGQT936uX0wJEOFjEerT6u84PzK1meGzl6lsA== X-Received: by 10.99.123.88 with SMTP id k24mr4276308pgn.213.1509244657789; Sat, 28 Oct 2017 19:37:37 -0700 (PDT) Received: from [192.168.2.122] (174-24-242-218.tukw.qwest.net. [174.24.242.218]) by smtp.gmail.com with ESMTPSA id s71sm22249777pfa.147.2017.10.28.19.37.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Oct 2017 19:37:36 -0700 (PDT) Subject: Re: Allow faster eventhandler dispatching by keeping pointers to handler lists. To: Ian Lepore , "freebsd-arch@FreeBSD.org" References: <1509243567.56824.103.camel@freebsd.org> From: Matt Joras Message-ID: <3a71dd31-99cb-c891-9d52-a7f2e7010011@FreeBSD.org> Date: Sat, 28 Oct 2017 19:37:35 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1509243567.56824.103.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US 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 03:00:48 -0000 On 10/28/2017 19:19, Ian Lepore wrote: > 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 > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" Hah, as it happens I just posted a revision with largely the same intention, though I approached the problem a bit differently: https://reviews.freebsd.org/D12814. Matt