Commit 48738e38 authored by Vishal Verma's avatar Vishal Verma Committed by Jim Harris
Browse files

event: Remove timer poll count checks



This removes checks for timer poll iterations
within a reactor.

Change-Id: Id8eea26dab201064123575998b3b24e1f609ac5a
Signed-off-by: default avatarVishal Verma <vishal4.verma@intel.com>
Reviewed-on: https://review.gerrithub.io/412694


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 919252ce
Loading
Loading
Loading
Loading
+14 −24
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#define SPDK_MAX_SOCKET		64

#define SPDK_REACTOR_SPIN_TIME_USEC	1000
#define SPDK_TIMER_POLL_ITERATIONS	5
#define SPDK_EVENT_BATCH_SIZE		8
#define SPDK_SEC_TO_USEC		1000000ULL

@@ -439,7 +438,6 @@ _spdk_reactor_run(void *arg)
	uint64_t		idle_started, now;
	uint64_t		spin_cycles, sleep_cycles;
	uint32_t		sleep_us;
	uint32_t		timer_poll_count;
	char			thread_name[32];

	snprintf(thread_name, sizeof(thread_name), "reactor_%u", reactor->lcore);
@@ -455,7 +453,6 @@ _spdk_reactor_run(void *arg)
	spin_cycles = SPDK_REACTOR_SPIN_TIME_USEC * spdk_get_ticks_hz() / SPDK_SEC_TO_USEC;
	sleep_cycles = reactor->max_delay_us * spdk_get_ticks_hz() / SPDK_SEC_TO_USEC;
	idle_started = 0;
	timer_poll_count = 0;
	if (g_context_switch_monitor_enabled) {
		_spdk_reactor_context_switch_monitor_start(reactor, NULL);
	}
@@ -481,7 +478,6 @@ _spdk_reactor_run(void *arg)
			took_action = true;
		}

		if (timer_poll_count >= SPDK_TIMER_POLL_ITERATIONS) {
		poller = TAILQ_FIRST(&reactor->timer_pollers);
		if (poller) {
			now = spdk_get_ticks();
@@ -499,10 +495,6 @@ _spdk_reactor_run(void *arg)
				took_action = true;
			}
		}
			timer_poll_count = 0;
		} else {
			timer_poll_count++;
		}

		if (took_action) {
			/* We were busy this loop iteration. Reset the idle timer. */
@@ -536,8 +528,6 @@ _spdk_reactor_run(void *arg)
					usleep(sleep_us);
				}

				/* After sleeping, always poll for timers */
				timer_poll_count = SPDK_TIMER_POLL_ITERATIONS;
			}
		}