提交 bcfd8d36 编写于 作者: A Andrew Morton 提交者: Jens Axboe

[PATCH] CONFIG_BLOCK: blk_congestion_wait() fix

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: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 5e6d12b2
#ifndef _LINUX_BLKDEV_H
#define _LINUX_BLKDEV_H
#include <linux/sched.h>
#include <linux/major.h>
#include <linux/genhd.h>
#include <linux/list.h>
......@@ -848,7 +849,7 @@ 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)
......@@ -856,7 +857,9 @@ 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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册