Re: balance_dirty_pages broken

From: Doug Ledford (dledford@redhat.com)
Date: Thu Oct 17 2002 - 01:01:23 EST


On Wed, Oct 16, 2002 at 10:54:15PM -0700, Andrew Morton wrote:
> 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 ;)

OK. .config attached, error message inline:

  gcc -Wp,-MD,arch/i386/kernel/.mpparse.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=mpparse -c -o arch/i386/kernel/mpparse.o
arch/i386/kernel/mpparse.c
arch/i386/kernel/mpparse.c: In function `MP_processor_info':
arch/i386/kernel/mpparse.c:130: warning: implicit declaration of function
`Dprintk'
arch/i386/kernel/mpparse.c: In function `mp_register_lapic_address':
arch/i386/kernel/mpparse.c:801: `FIX_APIC_BASE' undeclared (first use in
this function)
arch/i386/kernel/mpparse.c:801: (Each undeclared identifier is reported
only once
arch/i386/kernel/mpparse.c:801: for each function it appears in.)
arch/i386/kernel/mpparse.c:804: warning: implicit declaration of function
`apic_read'
make[1]: *** [arch/i386/kernel/mpparse.o] Error 1
make: *** [arch/i386/kernel] Error 2

> > ...
> > 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:

Should I run another test of just this patch to be sure? (If so, it will
have to be tomorrow, I've already called the wife and told her I'm on my
way home ;-)

>
>
> --- 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]);
>
> .

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  


- 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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:32 EST