[patch?] Re: Do ramdisk exec's map direct to buffer cache?

From: Mike Galbraith (mikeg@weiden.de)
Date: Sun Jul 30 2000 - 10:07:32 EST


On Fri, 21 Jul 2000, Jeff Garzik wrote:

> On 19 Jul 2000, Linus Torvalds wrote:
> > At least cramfs works. I have about ten reports of loopback not working
> > lately, and I'm likely to disable it completely unless somebody steps in
> > to maintain the damn thing.

(I would, but I do too many wheel-up [pointing] landings)

> Mandrake, at least, uses it for various disk creation and testing
> scenarios. If its broken now, I don't care if it is disabled.
> But it will get fixed eventually...

Greetings,

I keep running into a deadlock with it looping forever trying to
free memory, triggered by blocking in getblk->refill_freelist->..
try_to_free_buffers->sync_page_buffers->zzzzz (kflushd runs forever).

The below seems to cure it. Without this, I can lock my box without
much effort. I beat on this pretty hard with no ill effects noted.

--- linux-2.4.0-test5.SirFsckalot/fs/buffer.c.org Sun Jul 30 12:35:44 2000
+++ linux-2.4.0-test5.SirFsckalot/fs/buffer.c Sun Jul 30 12:53:52 2000
@@ -2115,7 +2115,7 @@
                 if (buffer_locked(p)) {
                         if (wait)
                                 __wait_on_buffer(p);
- } else if (buffer_dirty(p))
+ } else if (buffer_dirty(p) && MAJOR(p->b_dev) != LOOP_MAJOR)
                         ll_rw_block(WRITE, 1, &p);
         } while (tmp != bh);
 }
--- linux-2.4.0-test5.SirFsckalot/drivers/block/loop.c.org Sun Jul 30 09:45:25 2000
+++ linux-2.4.0-test5.SirFsckalot/drivers/block/loop.c Sun Jul 30 14:53:03 2000
@@ -356,10 +356,10 @@
                 }
 
                 if (current_request->cmd == WRITE) {
- mark_buffer_uptodate(bh, 1);
- mark_buffer_dirty(bh, 1);
+ __mark_buffer_dirty(bh, 1);
+ ll_rw_block(WRITE, 1, &bh);
                 }
- brelse(bh);
+ bforget(bh);
                 dest_addr += size;
                 len -= size;
                 offset = 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:31 EST