Re: ANNOUNCE: Linux Kernel ORB: kORBit

From: Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz)
Date: Mon Dec 18 2000 - 16:57:44 EST


On Mon, 18 Dec 2000, Rik van Riel wrote:

> On Mon, 18 Dec 2000, Andrea Arcangeli wrote:
> > On Mon, Dec 18, 2000 at 06:29:24PM -0200, Rik van Riel wrote:
> > > Wrong. Getblk won't deadlock, it will just sleep and another
> >
> > getblk will deadlock.
>
> OUCH. The only protection we have against this is the fact
> that atomic allocations are not allowed to eat up all memory
> in the system and that every thread can only have 1 getblk
> operation at a time, right?

You have small posibility that interrupt will eat up memory - interrupt in
process that has PF_MEMALLOC. Patch:

--- linux/mm/page_alloc.c_ Mon Dec 18 22:48:47 2000
+++ linux/mm/page_alloc.c Mon Dec 18 22:53:52 2000
@@ -516,7 +516,7 @@
 
                 /* XXX: is pages_min/4 a good amount to reserve for this? */
                 if (z->free_pages < z->pages_min / 4 &&
- !(current->flags & PF_MEMALLOC))
+ (!(current->flags & PF_MEMALLOC) || in_interrupt()))
                         continue;
                 page = rmqueue(z, order);
                 if (page)

Mikulas

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



This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:23 EST