From owner-svn-src-head@FreeBSD.ORG Tue Jan 7 01:17:28 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AA2BCAD; Tue, 7 Jan 2014 01:17:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 66DDA1FFC; Tue, 7 Jan 2014 01:17:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s071HSnZ041116; Tue, 7 Jan 2014 01:17:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s071HSRW041114; Tue, 7 Jan 2014 01:17:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201401070117.s071HSRW041114@svn.freebsd.org> From: Adrian Chadd Date: Tue, 7 Jan 2014 01:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260384 - in head/sys: conf kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 01:17:28 -0000 Author: adrian Date: Tue Jan 7 01:17:27 2014 New Revision: 260384 URL: http://svnweb.freebsd.org/changeset/base/260384 Log: Add a compile-time control over the size of KN_HASHSIZE. This is needed for applications that use a lot of non-filedescriptor knotes. MFC after: 1 week Sponsored by: Netflix, Inc. Modified: head/sys/conf/options head/sys/kern/kern_event.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Jan 7 00:38:22 2014 (r260383) +++ head/sys/conf/options Tue Jan 7 01:17:27 2014 (r260384) @@ -128,6 +128,7 @@ GEOM_VOL opt_geom.h GEOM_ZERO opt_geom.h KDTRACE_HOOKS opt_global.h KDTRACE_FRAME opt_kdtrace.h +KN_HASHSIZE opt_kqueue.h KSTACK_MAX_PAGES KSTACK_PAGES KTRACE Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Jan 7 00:38:22 2014 (r260383) +++ head/sys/kern/kern_event.c Tue Jan 7 01:17:27 2014 (r260384) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ktrace.h" +#include "opt_kqueue.h" #include #include @@ -250,7 +251,10 @@ SYSCTL_UINT(_kern, OID_AUTO, kq_calloutm #define KNL_ASSERT_UNLOCKED(knl) do {} while (0) #endif /* INVARIANTS */ +#ifndef KN_HASHSIZE #define KN_HASHSIZE 64 /* XXX should be tunable */ +#endif + #define KN_HASH(val, mask) (((val) ^ (val >> 8)) & (mask)) static int