lkml.org 
[lkml]   [2000]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ANNOUNCE: Linux Kernel ORB: kORBit
> > I guess that when you mmap large files over nfs and write to them, you get
> > similar problems.
> >
> > > Oh, and try to eat atomic memory by ping -f kORBit-ized box.
> >
> > When linux is out of atomic memory, it will die anyway.
>
> Not unless your driver is broken.

ok_to_allocate:
******* INTERRUPT ********
spin_lock_irqsave(&page_alloc_lock, flags);
/* if it's not a dma request, try non-dma first */
if (!(gfp_mask & __GFP_DMA))
RMQUEUE_TYPE(order, 0);
RMQUEUE_TYPE(order, 1);
spin_unlock_irqrestore(&page_alloc_lock, flags);

nopage:
return 0;
}

When interrupt comes here and eats page just freed by try_to_free_pages(),
GFP_KERNEL allocation will fail => The kernel goes crazy, shoots
processes, returns -ENOMEM to calls, maybe damages its structures.
Deadlock in getblk, if memory is full of dirty file mapped pages.

You actually do not need network flood to kill your box. Just imagine that
kpiod is swapping files out too slowly, free memory is going lower and
lower, every process screaming with "VM: do_try_to_free_pages failed" and
the system is aproaching instant death.


Besides, __get_free_pages just encourages people to write broken drivers
because it tries to hide allocation bugs. If there would be something like

if (current->flags & PF_MEMALLOC && !in_interrupt()) panic("swapper fscked up!");

you would see how many parts of system are "broken".

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/

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