Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3835
b: refs/heads/master
c: 082cf69
h: refs/heads/master
i:
  3833: 75e4d33
  3831: 567dc23
v: v3
  • Loading branch information
Jens Axboe authored and Linus Torvalds committed Jun 28, 2005
1 parent 2b1d55b commit 55576f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8b58edf3acf0dcc186b8330939000ecf709368a
refs/heads/master: 082cf69eb82681f4eacb3a5653834c7970714bef
9 changes: 9 additions & 0 deletions trunk/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,15 @@ static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
}

get_rq:
/*
* Only allow batching queuers to allocate up to 50% over the defined
* limit of requests, otherwise we could have thousands of requests
* allocated with any setting of ->nr_requests
*/
if (rl->count[rw] >= (3 * q->nr_requests / 2)) {
spin_unlock_irq(q->queue_lock);
goto out;
}
rl->count[rw]++;
rl->starved[rw] = 0;
if (rl->count[rw] >= queue_congestion_on_threshold(q))
Expand Down

0 comments on commit 55576f8

Please sign in to comment.