• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/mm/

Lines Matching refs:buddy

288  * function for dealing with page's order in buddy system.
310 * Locate the struct page for both the matching buddy in our
313 * 1) Any buddy B1 will have an order O twin B2 which satisfies
316 * For example, if the starting buddy (buddy2) is #8 its order
317 * 1 buddy is #10:
320 * 2) Any buddy B will have an order O+1 parent P which
341 * This function checks whether a page is free && is the buddy
342 * we can do coalesce a page and its buddy if
343 * (a) the buddy is not in a hole &&
344 * (b) the buddy is in the buddy system &&
345 * (c) a page and its buddy have the same order &&
346 * (d) a page and its buddy are in the same zone.
348 * For recording whether a page is in the buddy system, we use PG_buddy.
353 static inline int page_is_buddy(struct page *page, struct page *buddy,
356 if (!pfn_valid_within(page_to_pfn(buddy)))
359 if (page_zone_id(page) != page_zone_id(buddy))
362 if (PageBuddy(buddy) && page_order(buddy) == order) {
363 BUG_ON(page_count(buddy) != 0);
370 * Freeing function for a buddy system allocator.
372 * The concept of a buddy system is to maintain direct-mapped table
387 * If a block is freed, and its buddy is also free, then this
411 struct page *buddy;
413 buddy = __page_find_buddy(page, page_idx, order);
414 if (!page_is_buddy(page, buddy, order))
415 break; /* Move the buddy up one level. */
417 list_del(&buddy->lru);
420 rmv_page_order(buddy);
560 * by considering the behavior of a buddy system containing a single
630 * Do the hard work of removing an element from the buddy allocator.
657 * Obtain a specified number of elements from the buddy allocator, all under
763 * Spill all of this CPU's per-cpu pages back into the buddy allocator.
1208 * This is the 'heart' of the zoned buddy allocator.
2045 * the buddy list. This is safe since pageset manipulation is done
2685 * for the buddy allocator to function correctly.
3265 * can have before it gets flushed back to buddy allocator.