From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH] enable acpi_os_allocate() to allocate larger memory Date: Mon, 23 May 2005 14:42:58 +0100 Message-ID: <1116855778.5744.47.camel@localhost.localdomain> References: <4291BE51.1090004@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4291BE51.1090004-+CUm20s59erQFUHtdCDX3A@public.gmane.org> Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Kenji Kaneshige Cc: Len Brown , acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org On Llu, 2005-05-23 at 12:28, Kenji Kaneshige wrote: > - return kmalloc(size, GFP_KERNEL); > + void *ptr = kmalloc(size, GFP_KERNEL); > + if (!ptr) This looks reasonable. Do you think it would be better to use GFP_KERNEL|__GFP_NORETRY|__GFP_NOWARN ? Tbe __GFP_NORETRY tells the vm it is ok to fail the kmalloc rather than wait and try for a long long time. The _NOWARN says "we know this can fail in normal use so don't log failure". (See include/linux/gfp.h for more documentation) Alan ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click