Re: Question about page allocation failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




the related code is here:

       /* This allocation should allow future memory freeing. */

if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE)))
                       && !in_interrupt()) {
               if (!(gfp_mask & __GFP_NOMEMALLOC)) {
/* go through the zonelist yet again, ignoring mins */
                       for (i = 0; (z = zones[i]) != NULL; i++) {
                               if (!cpuset_zone_allowed(z))
                                       continue;
                               page = buffered_rmqueue(z, order, gfp_mask);
                               if (page)
                                       goto got_pg;
                       }
               }
               goto nopage;
       }

       /* Atomic allocations - we can't balance anything */
       if (!wait)
               goto nopage;
nopage:
       if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
               printk(KERN_WARNING "%s: page allocation failure."
                       " order:%d, mode:0x%x\n",
                       p->comm, order, gfp_mask);
               dump_stack();
       }
       return NULL;



if we are in normal case, there have two possbiles:
   1. total of memory  is too low.
   2. /* Atomic allocations - we can't balance anything */

I think this is not too dangerous.

PS: I use 2.6.12.

Any more clear idea?


sailor



nopage:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux