[lkml]   [2004]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] 2.6.5-aa1 arch updates
    Andrew Morton <> wrote:
    > Hugh Dickins <> wrote:
    > >
    > > I notice that's a __GFP_REPEAT allocation, but even those fail when
    > > OOM-killed - I find its alias __GFP_NOFAIL very misleading.
    > #define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */
    > #define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */
    > __GFP_REPEAT is mainly for higher-order allocations which would otherwise
    > have given up too early.

    It all comes back to me now. The reason there is a __GFP_REPEAT in the
    pte_alloc_one() implementations is that lots of architectures used to do
    stuff like this:

    static inline pte_t *
    pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
    int count = 0;
    pte_t *pte;

    do {
    pte = (pte_t *)__get_free_page(GFP_KERNEL);
    if (pte)
    else {
    current->state = TASK_UNINTERRUPTIBLE;
    } while (!pte && (count++ < 10));

    return pte;

    That was all removed and the __GFP_REPEAT flag was added instead, as a "try
    really hard" hint to the page allocator.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:02    [W:0.024 / U:3.972 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site