Re: GFP_FAIL?

From: Tommy Reynolds (reynolds@redhat.com)
Date: Tue Sep 25 2001 - 14:46:11 EST


Pavel Machek <pavel@suse.cz> was pleased to say:

> Hi!
>
> I need to alloc as much memory as possible, *but not more*. I do not
> want to OOM-kill anything. How do I do this? Tried GFP_KERNEL, will
> oom-kill. GFP_USER will OOM-kill, too.

Try GFP_ATOMIC; GFP_KERNEL sets the __GFP_WAIT flag and you don't want that.
But, if you're really asking how to know how large the current working set is,
so that you don't grab more than your applications are going to need and
eventually OOM, you'll need to set GFP_HAVE_CRYSTAL_BALL ;-)

-- 

Tommy Reynolds | Red Hat, Inc. (Embedded Development) | "The quickest way to do anything 307 Wynn Drive NW, Huntsville, AL 35805 USA | is right the first time." mailto:reynolds@redhat.com | - The Lieutenant (Rick Phone: +1.256.704.9286 | Jason), "Combat!", Mobile: +1.919.641.2923 | 1962 TV series FAX: +1.256.837.3839 | - 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 : Sun Sep 30 2001 - 21:00:33 EST