Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261166AbVAHNoo (ORCPT ); Sat, 8 Jan 2005 08:44:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261167AbVAHNoo (ORCPT ); Sat, 8 Jan 2005 08:44:44 -0500 Received: from bay-bridge.veritas.com ([143.127.3.10]:8431 "EHLO MTVMIME03.enterprise.veritas.com") by vger.kernel.org with ESMTP id S261166AbVAHNom (ORCPT ); Sat, 8 Jan 2005 08:44:42 -0500 Date: Sat, 8 Jan 2005 13:43:54 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: Nikita Danilov cc: Andrew Morton , , , , Subject: Re: [RFC] per thread page reservation patch In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1023 Lines: 31 On Sat, 8 Jan 2005, Nikita Danilov wrote: > Andrew Morton writes: > > > > __alloc_pages(GFP_KERNEL, ...) doesn't return NULL. It'll either succeed > > or never return ;) That behaviour may change at any time of course, but it > > Hmm... it used to, when I wrote that code. And still does, if OOM decides to kill _your_ task: OOM sets PF_MEMDIE, and then you don't get to go the retry route at all: /* This allocation should allow future memory freeing. */ if ((p->flags & (PF_MEMALLOC | PF_MEMDIE)) && !in_interrupt()) { /* go through the zonelist yet again, ignoring mins */ for (i = 0; (z = zones[i]) != NULL; i++) { page = buffered_rmqueue(z, order, gfp_mask); if (page) goto got_pg; } goto nopage; } .... nopage: .... return NULL; - 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/