The result is unnecessary I/O and slowdown in a lot of cases. For example,
while configuring gcc, the system is paging out 400-500Kb/s constantly,
while in previous kernels the pageout rate was more like 10-20Kb/s.
The patch below fixes this problem:
--- linux/fs/buffer.c.orig Fri Aug 10 21:42:52 2001
+++ linux/fs/buffer.c Fri Aug 10 21:34:47 2001
@@ -2601,20 +2601,20 @@
sync_supers(0);
unlock_kernel();
- spin_lock(&lru_list_lock);
for (;;) {
- if (write_some_buffers(NODEV)) {
- struct buffer_head *bh;
+ struct buffer_head *bh;
- spin_lock(&lru_list_lock);
- bh = lru_list[BUF_DIRTY];
- if (bh && !time_before(jiffies, bh->b_flushtime))
- continue;
+ spin_lock(&lru_list_lock);
+ bh = lru_list[BUF_DIRTY];
+ if (!bh || time_before(jiffies, bh->b_flushtime)) {
spin_unlock(&lru_list_lock);
+ break;
}
- run_task_queue(&tq_disk);
- return 0;
+ if (!write_some_buffers(NODEV))
+ break;
}
+ run_task_queue(&tq_disk);
+ return 0;
}
int block_sync_page(struct page *page)
-- Peter Österlund peter.osterlund@mailbox.swipnet.se Sköndalsvägen 35 http://home1.swipnet.se/~w-15919 S-128 66 Sköndal +46 8 942647 Sweden
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/