lkml.org 
[lkml]   [2002]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: balance_dirty_pages broken
Doug Ledford wrote:
>
> On Thu, Oct 17, 2002 at 01:22:46AM -0400, Doug Ledford wrote:
> > Sure, coming under separate cover.
>
> Actually, this isn't needed now I assume ;-)

Well I was rather interested in seeing it to find out why your
compile is busted. You seem to be very protective of the compiler
error messages ;)

> ...
> Patch solves the problem. Writes don't hang and Shift-ScrollLock shows a
> reasonable number for dirty now.

OK, thanks. That patch still doesn't fix the ramdisk's current problems
so I'll send a minimal fix for this one to Linus.

Namely:



--- 2.5.43/drivers/block/rd.c~rd-dirty-fix Wed Oct 16 22:46:02 2002
+++ 2.5.43-akpm/drivers/block/rd.c Wed Oct 16 22:47:39 2002
@@ -51,6 +51,7 @@
#include <linux/init.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/buffer_head.h> /* for invalidate_bdev() */
+#include <linux/backing-dev.h>
#include <asm/uaccess.h>

/*
@@ -351,6 +352,10 @@ static struct file_operations initrd_fop

#endif

+static struct backing_dev_info rd_backing_dev_info = {
+ .ra_pages = 0, /* No readahead */
+ .memory_backed = 1, /* Does not contribute to dirty memory */
+};

static int rd_open(struct inode * inode, struct file * filp)
{
@@ -379,6 +384,7 @@ static int rd_open(struct inode * inode,
rd_bdev[unit]->bd_openers++;
rd_bdev[unit]->bd_block_size = rd_blocksize;
rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops;
+ rd_bdev[unit]->bd_inode->i_mapping->backing_dev_info = &rd_backing_dev_info;
rd_bdev[unit]->bd_inode->i_size = rd_length[unit];
rd_bdev[unit]->bd_queue = &blk_dev[MAJOR_NR].request_queue;
rd_bdev[unit]->bd_disk = get_disk(rd_disks[unit]);
.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.050 / U:21.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site