Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310409
b: refs/heads/master
c: 914bec1
h: refs/heads/master
i:
  310407: 6e05d53
v: v3
  • Loading branch information
Hiroaki SHIMODA authored and David S. Miller committed May 31, 2012
1 parent d7e7d7d commit 0aaee37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 25426b794efdc70dde7fd3134dc56fac3e7d562d
refs/heads/master: 914bec1011a25f65cdc94988a6f974bfb9a3c10d
12 changes: 7 additions & 5 deletions trunk/lib/dynamic_queue_limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@
void dql_completed(struct dql *dql, unsigned int count)
{
unsigned int inprogress, prev_inprogress, limit;
unsigned int ovlimit, completed;
unsigned int ovlimit, completed, num_queued;
bool all_prev_completed;

num_queued = ACCESS_ONCE(dql->num_queued);

/* Can't complete more than what's in queue */
BUG_ON(count > dql->num_queued - dql->num_completed);
BUG_ON(count > num_queued - dql->num_completed);

completed = dql->num_completed + count;
limit = dql->limit;
ovlimit = POSDIFF(dql->num_queued - dql->num_completed, limit);
inprogress = dql->num_queued - completed;
ovlimit = POSDIFF(num_queued - dql->num_completed, limit);
inprogress = num_queued - completed;
prev_inprogress = dql->prev_num_queued - dql->num_completed;
all_prev_completed = AFTER_EQ(completed, dql->prev_num_queued);

Expand Down Expand Up @@ -106,7 +108,7 @@ void dql_completed(struct dql *dql, unsigned int count)
dql->prev_ovlimit = ovlimit;
dql->prev_last_obj_cnt = dql->last_obj_cnt;
dql->num_completed = completed;
dql->prev_num_queued = dql->num_queued;
dql->prev_num_queued = num_queued;
}
EXPORT_SYMBOL(dql_completed);

Expand Down

0 comments on commit 0aaee37

Please sign in to comment.