Messages in this thread | | | Date | Sat, 8 Jan 2005 13:43:54 +0000 (GMT) | From | Hugh Dickins <> | Subject | Re: [RFC] per thread page reservation patch |
| |
On Sat, 8 Jan 2005, Nikita Danilov wrote: > Andrew Morton <akpm@osdl.org> 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/
| |