From: Andrew Morton <akpm@digeo.com>
To: Doug Ledford <dledford@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: balance_dirty_pages broken
Date: Wed, 16 Oct 2002 22:54:15 -0700 [thread overview]
Message-ID: <3DAE5087.76395305@digeo.com> (raw)
In-Reply-To: 20021017054110.GC10276@redhat.com
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]);
.
next prev parent reply other threads:[~2002-10-17 5:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-17 4:36 balance_dirty_pages broken Doug Ledford
2002-10-17 5:09 ` Andrew Morton
2002-10-17 5:22 ` Doug Ledford
2002-10-17 5:41 ` Doug Ledford
2002-10-17 5:54 ` Andrew Morton [this message]
2002-10-17 6:01 ` Doug Ledford
2002-10-17 6:09 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DAE5087.76395305@digeo.com \
--to=akpm@digeo.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox