Skip to content

Commit

Permalink
[PATCH] CONFIG_BLOCK: blk_congestion_wait() fix
Browse files Browse the repository at this point in the history
Don't just do nothing: it'll cause busywaits all over writeback and page
reclaim.

For now, take a fixed-length nap.  Will improve when NFS starts waking up
throttled processes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Andrew Morton authored and Jens Axboe committed Sep 30, 2006
1 parent 5e6d12b commit bcfd8d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _LINUX_BLKDEV_H
#define _LINUX_BLKDEV_H

#include <linux/sched.h>
#include <linux/major.h>
#include <linux/genhd.h>
#include <linux/list.h>
Expand Down Expand Up @@ -848,15 +849,17 @@ void kblockd_flush(void);

static inline long blk_congestion_wait(int rw, long timeout)
{
return timeout;
return io_schedule_timeout(timeout);
}

static inline long nr_blockdev_pages(void)
{
return 0;
}

static inline void exit_io_context(void) {}
static inline void exit_io_context(void)
{
}

#endif /* CONFIG_BLOCK */

Expand Down

0 comments on commit bcfd8d3

Please sign in to comment.