Add ITERATIONS_PER_REACTOR_CHECK
This commit is contained in:
parent
2ad8955dd3
commit
8076806e76
|
@ -171,6 +171,7 @@ void FlowKnobs::initialize(Randomize randomize, IsSimulated isSimulated) {
|
||||||
init( MIN_LOGGED_PRIORITY_BUSY_FRACTION, 0.05 );
|
init( MIN_LOGGED_PRIORITY_BUSY_FRACTION, 0.05 );
|
||||||
init( CERT_FILE_MAX_SIZE, 5 * 1024 * 1024 );
|
init( CERT_FILE_MAX_SIZE, 5 * 1024 * 1024 );
|
||||||
init( READY_QUEUE_RESERVED_SIZE, 8192 );
|
init( READY_QUEUE_RESERVED_SIZE, 8192 );
|
||||||
|
init( ITERATIONS_PER_REACTOR_CHECK, 5 );
|
||||||
|
|
||||||
//Network
|
//Network
|
||||||
init( PACKET_LIMIT, 100LL<<20 );
|
init( PACKET_LIMIT, 100LL<<20 );
|
||||||
|
|
|
@ -226,6 +226,7 @@ public:
|
||||||
double MIN_LOGGED_PRIORITY_BUSY_FRACTION;
|
double MIN_LOGGED_PRIORITY_BUSY_FRACTION;
|
||||||
int CERT_FILE_MAX_SIZE;
|
int CERT_FILE_MAX_SIZE;
|
||||||
int READY_QUEUE_RESERVED_SIZE;
|
int READY_QUEUE_RESERVED_SIZE;
|
||||||
|
int ITERATIONS_PER_REACTOR_CHECK;
|
||||||
|
|
||||||
// Network
|
// Network
|
||||||
int64_t PACKET_LIMIT;
|
int64_t PACKET_LIMIT;
|
||||||
|
|
|
@ -1533,8 +1533,8 @@ void Net2::run() {
|
||||||
minTaskID = currentTaskID;
|
minTaskID = currentTaskID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt to empty out the IO backlog for every 5 tasks while in this loop
|
// attempt to empty out the IO backlog
|
||||||
if (ready.size() % 5 == 1) {
|
if (ready.size() % FLOW_KNOBS->ITERATIONS_PER_REACTOR_CHECK == 1) {
|
||||||
if (runFunc) {
|
if (runFunc) {
|
||||||
runFunc();
|
runFunc();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue