On Sat, Jun 10, 2000 at 12:46:01PM +1000, Andrew Morton wrote:
> Andi Kleen wrote:
> > 
> > Increasing /proc/sys/vm/freepages. That'll keep more memory for interrupts.
> > 
> 
> Andrey tells me he uses this file to create artificial out-of-memory
> conditions when testing drivers.
> 
> I've poked various numbers in there but I can't seem to force an OOM
> condition in the driver.  Having read the description in
> Documentation/sysctl/vm.txt it appears that I need to run another app
> which will exhaust vm...
> 
> So.  Could someone please tell me what to do to force an alloc_skb OOM
> condition within a network device driver?

Add 

        if (net_random() % 20 == 0) 
                return NULL;


on top of alloc_skb ? 


-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to