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
b47601c298
commit
7f18e0f33d
@ -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…
x
Reference in New Issue
Block a user