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()
270 unsigned int order; in drm_test_buddy_alloc_clear() local
344 * repeat the whole thing, increment the order until we hit the max_order. in drm_test_buddy_alloc_clear()
366 order = 1; in drm_test_buddy_alloc_clear()
368 size = SZ_4K << order; in drm_test_buddy_alloc_clear()
383 } while (++order <= max_order); in drm_test_buddy_alloc_clear()
495 int order, top; in drm_test_buddy_alloc_pathological() local
503 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pathological()
522 for (order = top; order--;) { in drm_test_buddy_alloc_pathological()
523 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pathological()
527 "buddy_alloc hit -ENOMEM with order=%d, top=%d\n", in drm_test_buddy_alloc_pathological()
528 order, top); in drm_test_buddy_alloc_pathological()
550 "buddy_alloc unexpectedly succeeded at top-order %d/%d, it should be full!", in drm_test_buddy_alloc_pathological()
557 for (order = 1; order <= max_order; order++) { in drm_test_buddy_alloc_pathological()
558 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pathological()
561 "buddy_alloc unexpectedly succeeded at order %d, it should be full!", in drm_test_buddy_alloc_pathological()
562 order); in drm_test_buddy_alloc_pathological()
577 unsigned int order; in drm_test_buddy_alloc_pessimistic() local
583 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pessimistic()
593 for (order = 0; order < max_order; order++) { in drm_test_buddy_alloc_pessimistic()
594 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
597 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
598 order); in drm_test_buddy_alloc_pessimistic()
618 for (order = max_order; order--;) { in drm_test_buddy_alloc_pessimistic()
619 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
630 order = 1; in drm_test_buddy_alloc_pessimistic()
635 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_pessimistic()
638 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
639 order); in drm_test_buddy_alloc_pessimistic()
646 order++; in drm_test_buddy_alloc_pessimistic()
653 "buddy_alloc (realloc) hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
674 int order; in drm_test_buddy_alloc_optimistic() local
677 * Create a mm with one block of each order available, and in drm_test_buddy_alloc_optimistic()
688 for (order = 0; order <= max_order; order++) { in drm_test_buddy_alloc_optimistic()
689 size = get_size(order, mm.chunk_size); in drm_test_buddy_alloc_optimistic()
692 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_optimistic()
693 order); in drm_test_buddy_alloc_optimistic()
733 "block order(%d) != %d\n", in drm_test_buddy_alloc_limit()