aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-08-09 22:39:46 -0700
committerGarrett D'Amore <garrett@damore.org>2021-08-09 22:39:46 -0700
commiteca7cb3ac170e159f5a5b79f68b1890409f7179e (patch)
tree1ae94d6ed3ec2b66af3c745dd89e626bfcc07b7c /src/core/defs.h
parent22f089b6b5ebe3be380c33c926990fe891ae0da9 (diff)
downloadnng-eca7cb3ac170e159f5a5b79f68b1890409f7179e.tar.gz
nng-eca7cb3ac170e159f5a5b79f68b1890409f7179e.tar.bz2
nng-eca7cb3ac170e159f5a5b79f68b1890409f7179e.zip
fixes #1488 aio expiration list performance work needed
There were several problems with the array implementation, both from performance and from correctness. This corrects those errors (hopefully) and restores the expiration lists as linked lists.
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index b1dbed18..fb9c7447 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -165,9 +165,10 @@ typedef nni_type nni_opt_type;
// NNI_MAX_HEADER_SIZE is our header size.
#define NNI_MAX_HEADER_SIZE ((NNI_MAX_MAX_TTL + 1) * sizeof(uint32_t))
-// NNI_EXPIRE_Q_SIZE is the default size of aio expire queue
-#ifndef NNI_EXPIRE_Q_SIZE
-#define NNI_EXPIRE_Q_SIZE 256
+// NNI_EXPIRE_BATCH lets us handle expiration in batches,
+// reducing the number of traverses of the expiration list we perform.
+#ifndef NNI_EXPIRE_BATCH
+#define NNI_EXPIRE_BATCH 100
#endif
#endif // CORE_DEFS_H