Lines Matching full:order

19 static inline u64 get_size(int order, u64 chunk_size)  in get_size()  argument
21 return (1 << order) * chunk_size; in get_size()
28 unsigned int i, count, *order; in drm_test_buddy_alloc_range_bias() local
45 order = drm_random_order(count, &prng); in drm_test_buddy_alloc_range_bias()
46 KUNIT_EXPECT_TRUE(test, order); in drm_test_buddy_alloc_range_bias()
50 * in some random order allocate within each bias, using various in drm_test_buddy_alloc_range_bias()
59 bias_start = order[i] * bias_size; in drm_test_buddy_alloc_range_bias()
164 kfree(order); in drm_test_buddy_alloc_range_bias()
269 unsigned int order; in drm_test_buddy_alloc_clear() local
343 * repeat the whole thing, increment the order until we hit the max_order. in drm_test_buddy_alloc_clear()
365 order = 1; in drm_test_buddy_alloc_clear()
367 size = SZ_4K << order; in drm_test_buddy_alloc_clear()
382 } while (++order <= max_order); in drm_test_buddy_alloc_clear()
505 int order, top; in drm_test_buddy_alloc_pathological() local
513 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pathological()
532 for (order = top; order--;) { in drm_test_buddy_alloc_pathological()
533 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pathological()
537 "buddy_alloc hit -ENOMEM with order=%d, top=%d\n", in drm_test_buddy_alloc_pathological()
538 order, top); in drm_test_buddy_alloc_pathological()
560 "buddy_alloc unexpectedly succeeded at top-order %d/%d, it should be full!", in drm_test_buddy_alloc_pathological()
567 for (order = 1; order <= max_order; order++) { in drm_test_buddy_alloc_pathological()
568 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pathological()
571 "buddy_alloc unexpectedly succeeded at order %d, it should be full!", in drm_test_buddy_alloc_pathological()
572 order); in drm_test_buddy_alloc_pathological()
587 unsigned int order; in drm_test_buddy_alloc_pessimistic() local
593 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pessimistic()
603 for (order = 0; order < max_order; order++) { in drm_test_buddy_alloc_pessimistic()
604 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
607 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
608 order); in drm_test_buddy_alloc_pessimistic()
628 for (order = max_order; order--;) { in drm_test_buddy_alloc_pessimistic()
629 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
640 order = 1; in drm_test_buddy_alloc_pessimistic()
645 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
648 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
649 order); in drm_test_buddy_alloc_pessimistic()
656 order++; in drm_test_buddy_alloc_pessimistic()
663 "buddy_alloc (realloc) hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
684 int order; in drm_test_buddy_alloc_optimistic() local
687 * Create a mm with one block of each order available, and in drm_test_buddy_alloc_optimistic()
698 for (order = 0; order <= max_order; order++) { in drm_test_buddy_alloc_optimistic()
699 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_optimistic()
702 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_optimistic()
703 order); in drm_test_buddy_alloc_optimistic()
743 "block order(%d) != %d\n", in drm_test_buddy_alloc_limit()