mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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.
This commit is contained in:
parent
4d1e82a88e
commit
faa9b054a0
2 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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_calloutmax, CTLFLAG_RW,
|
|||
#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
|
||||
|
|
|
|||
Loading…
Reference in a new issue