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 <sys/param.h>
 #include <sys/systm.h>
@@ -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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to