From eca7cb3ac170e159f5a5b79f68b1890409f7179e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 9 Aug 2021 22:39:46 -0700 Subject: 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. --- src/core/defs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/defs.h') 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 -- cgit v1.2.3-70-g09d2