diff options
| author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-02-19 05:20:41 -0800 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-02-19 07:08:30 -0800 | 
| commit | 57957c59cd2925540769ae9cb58029b0125e4ae7 (patch) | |
| tree | 58b7cfb9c25f02d3816dd91f3f097ceccf5901fd | |
| parent | 6a250d9087014551c5085a534248982b195f819f (diff) | |
Remove conf->cache_size checks
Since we're not dependent on this io-thread internal state(i.e.
cache_size and current_size) to rate limit requests, we can remove
these two data members and code that checks for these.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 14 | ||||
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 2 | 
2 files changed, 0 insertions, 16 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 27140a39821..346e1234bb9 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -1022,8 +1022,6 @@ iot_queue (iot_worker_t *worker,  {  	iot_queue_t *queue;  	iot_conf_t *conf = worker->conf; -	iot_local_t *local = stub->frame->local; -	size_t frame_size = local->frame_size;  	queue = CALLOC (1, sizeof (*queue));  	ERR_ABORT (queue); @@ -1031,11 +1029,6 @@ iot_queue (iot_worker_t *worker,  	pthread_mutex_lock (&conf->lock); -	if (conf->cache_size) { -		while (frame_size && (conf->current_size >= conf->cache_size)) -			pthread_cond_wait (&conf->q_cond, &conf->lock); -	} -  	queue->next = &worker->queue;  	queue->prev = worker->queue.prev; @@ -1046,8 +1039,6 @@ iot_queue (iot_worker_t *worker,  	worker->queue_size++;  	worker->q++; -	conf->current_size += local->frame_size; -  	pthread_cond_broadcast (&worker->dq_cond);  	pthread_mutex_unlock (&conf->lock); @@ -1059,7 +1050,6 @@ iot_dequeue (iot_worker_t *worker)  	call_stub_t *stub = NULL;  	iot_queue_t *queue = NULL;  	iot_conf_t *conf = worker->conf; -	iot_local_t *local = NULL;  	pthread_mutex_lock (&conf->lock); @@ -1073,14 +1063,10 @@ iot_dequeue (iot_worker_t *worker)  	queue->prev->next = queue->next;  	stub = queue->stub; -	local = stub->frame->local;  	worker->queue_size--;  	worker->dq++; -	/* q_cond */ -	conf->current_size -= local->frame_size; -  	pthread_cond_broadcast (&conf->q_cond);  	pthread_mutex_unlock (&conf->lock); diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index db578115750..419f6fdb8e6 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -77,8 +77,6 @@ struct iot_conf {    struct iot_file files;    pthread_mutex_t files_lock; -  uint64_t cache_size; -  off_t current_size;    pthread_cond_t q_cond;    pthread_mutex_t lock;  };  | 
