Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76842
b: refs/heads/master
c: a656eb7
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Kirch authored and Roland Dreier committed Jan 25, 2008
1 parent 883d57a commit 49e8943
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fe7e6f7c9f55eac24c5b3cdf56af29ab9b0ca81
refs/heads/master: a656eb758fc6e6a42659ecf5ba34a5c5a2aeec17
12 changes: 6 additions & 6 deletions trunk/drivers/infiniband/core/fmr_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
struct ib_fmr_pool *pool = pool_ptr;

do {
if (pool->dirty_len >= pool->dirty_watermark ||
atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) < 0) {
if (atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) < 0) {
ib_fmr_batch_release(pool);

atomic_inc(&pool->flush_ser);
Expand All @@ -194,8 +193,7 @@ static int ib_fmr_cleanup_thread(void *pool_ptr)
}

set_current_state(TASK_INTERRUPTIBLE);
if (pool->dirty_len < pool->dirty_watermark &&
atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) >= 0 &&
if (atomic_read(&pool->flush_ser) - atomic_read(&pool->req_ser) >= 0 &&
!kthread_should_stop())
schedule();
__set_current_state(TASK_RUNNING);
Expand Down Expand Up @@ -511,8 +509,10 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
list_add_tail(&fmr->list, &pool->free_list);
} else {
list_add_tail(&fmr->list, &pool->dirty_list);
++pool->dirty_len;
wake_up_process(pool->thread);
if (++pool->dirty_len >= pool->dirty_watermark) {
atomic_inc(&pool->req_ser);
wake_up_process(pool->thread);
}
}
}

Expand Down

0 comments on commit 49e8943

Please sign in to comment.