Lines Matching full:order

21 static inline u64 get_size(int order, u64 chunk_size)  in get_size()  argument
23 return (1 << order) * chunk_size; in get_size()
49 …kunit_err(test, "block info: header=%llx, state=%u, order=%d, offset=%llx size=%llx root=%d buddy=… in __dump_block()
228 unsigned int order; in check_mm() local
244 order = drm_buddy_block_order(root); in check_mm()
247 if (order != mm->max_order) { in check_mm()
248 kunit_err(test, "max order root missing\n"); in check_mm()
268 block = list_first_entry_or_null(&mm->free_list[order], in check_mm()
271 kunit_err(test, "root mismatch at order=%u\n", order); in check_mm()
331 int order, top; in drm_test_buddy_alloc_pathological() local
339 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pathological()
358 for (order = top; order--;) { in drm_test_buddy_alloc_pathological()
359 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pathological()
363 "buddy_alloc hit -ENOMEM with order=%d, top=%d\n", in drm_test_buddy_alloc_pathological()
364 order, top); in drm_test_buddy_alloc_pathological()
386 "buddy_alloc unexpectedly succeeded at top-order %d/%d, it should be full!", in drm_test_buddy_alloc_pathological()
393 for (order = 1; order <= max_order; order++) { in drm_test_buddy_alloc_pathological()
394 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pathological()
397 "buddy_alloc unexpectedly succeeded at order %d, it should be full!", in drm_test_buddy_alloc_pathological()
398 order); in drm_test_buddy_alloc_pathological()
411 int *order; in drm_test_buddy_alloc_smoke() local
422 order = drm_random_order(mm.max_order + 1, &prng); in drm_test_buddy_alloc_smoke()
423 KUNIT_ASSERT_TRUE(test, order); in drm_test_buddy_alloc_smoke()
427 int max_order = order[i]; in drm_test_buddy_alloc_smoke()
432 int order, err; in drm_test_buddy_alloc_smoke() local
437 order = max_order; in drm_test_buddy_alloc_smoke()
442 size = get_size(order, chunk_size); in drm_test_buddy_alloc_smoke()
446 KUNIT_FAIL(test, "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_smoke()
447 order); in drm_test_buddy_alloc_smoke()
449 if (order--) { in drm_test_buddy_alloc_smoke()
454 KUNIT_FAIL(test, "buddy_alloc with order=%d failed\n", in drm_test_buddy_alloc_smoke()
455 order); in drm_test_buddy_alloc_smoke()
465 KUNIT_EXPECT_EQ_MSG(test, drm_buddy_block_order(block), order, in drm_test_buddy_alloc_smoke()
466 "buddy_alloc order mismatch\n"); in drm_test_buddy_alloc_smoke()
492 kfree(order); in drm_test_buddy_alloc_smoke()
503 unsigned int order; in drm_test_buddy_alloc_pessimistic() local
509 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pessimistic()
519 for (order = 0; order < max_order; order++) { in drm_test_buddy_alloc_pessimistic()
520 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
523 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
524 order); in drm_test_buddy_alloc_pessimistic()
544 for (order = max_order; order--;) { in drm_test_buddy_alloc_pessimistic()
545 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
556 order = 1; in drm_test_buddy_alloc_pessimistic()
561 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
564 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
565 order); in drm_test_buddy_alloc_pessimistic()
572 order++; in drm_test_buddy_alloc_pessimistic()
579 "buddy_alloc (realloc) hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
600 int order; in drm_test_buddy_alloc_optimistic() local
603 * Create a mm with one block of each order available, and in drm_test_buddy_alloc_optimistic()
614 for (order = 0; order <= max_order; order++) { in drm_test_buddy_alloc_optimistic()
615 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_optimistic()
618 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_optimistic()
619 order); in drm_test_buddy_alloc_optimistic()
717 "block order(%d) != %d\n", in drm_test_buddy_alloc_limit()