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()
227 unsigned int order; in check_mm() local
243 order = drm_buddy_block_order(root); in check_mm()
246 if (order != mm->max_order) { in check_mm()
247 kunit_err(test, "max order root missing\n"); in check_mm()
267 block = list_first_entry_or_null(&mm->free_list[order], in check_mm()
270 kunit_err(test, "root mismatch at order=%u\n", order); in check_mm()
330 int order, top; in drm_test_buddy_alloc_pathological() local
338 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pathological()
357 for (order = top; order--;) { in drm_test_buddy_alloc_pathological()
358 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pathological()
362 "buddy_alloc hit -ENOMEM with order=%d, top=%d\n", in drm_test_buddy_alloc_pathological()
363 order, top); in drm_test_buddy_alloc_pathological()
385 "buddy_alloc unexpectedly succeeded at top-order %d/%d, it should be full!", in drm_test_buddy_alloc_pathological()
392 for (order = 1; order <= max_order; order++) { in drm_test_buddy_alloc_pathological()
393 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pathological()
396 "buddy_alloc unexpectedly succeeded at order %d, it should be full!", in drm_test_buddy_alloc_pathological()
397 order); in drm_test_buddy_alloc_pathological()
410 int *order; in drm_test_buddy_alloc_smoke() local
421 order = drm_random_order(mm.max_order + 1, &prng); in drm_test_buddy_alloc_smoke()
422 KUNIT_ASSERT_TRUE(test, order); in drm_test_buddy_alloc_smoke()
426 int max_order = order[i]; in drm_test_buddy_alloc_smoke()
431 int order, err; in drm_test_buddy_alloc_smoke() local
436 order = max_order; in drm_test_buddy_alloc_smoke()
441 size = get_size(order, chunk_size); in drm_test_buddy_alloc_smoke()
445 KUNIT_FAIL(test, "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_smoke()
446 order); in drm_test_buddy_alloc_smoke()
448 if (order--) { in drm_test_buddy_alloc_smoke()
453 KUNIT_FAIL(test, "buddy_alloc with order=%d failed\n", in drm_test_buddy_alloc_smoke()
454 order); in drm_test_buddy_alloc_smoke()
464 KUNIT_EXPECT_EQ_MSG(test, drm_buddy_block_order(block), order, in drm_test_buddy_alloc_smoke()
465 "buddy_alloc order mismatch\n"); in drm_test_buddy_alloc_smoke()
491 kfree(order); in drm_test_buddy_alloc_smoke()
502 unsigned int order; in drm_test_buddy_alloc_pessimistic() local
508 * order within. This should leave the mm with exactly one in drm_test_buddy_alloc_pessimistic()
518 for (order = 0; order < max_order; order++) { in drm_test_buddy_alloc_pessimistic()
519 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
522 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
523 order); in drm_test_buddy_alloc_pessimistic()
543 for (order = max_order; order--;) { in drm_test_buddy_alloc_pessimistic()
544 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
555 order = 1; in drm_test_buddy_alloc_pessimistic()
560 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_pessimistic()
563 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
564 order); in drm_test_buddy_alloc_pessimistic()
571 order++; in drm_test_buddy_alloc_pessimistic()
578 "buddy_alloc (realloc) hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_pessimistic()
599 int order; in drm_test_buddy_alloc_optimistic() local
602 * Create a mm with one block of each order available, and in drm_test_buddy_alloc_optimistic()
613 for (order = 0; order <= max_order; order++) { in drm_test_buddy_alloc_optimistic()
614 size = get_size(order, PAGE_SIZE); in drm_test_buddy_alloc_optimistic()
617 "buddy_alloc hit -ENOMEM with order=%d\n", in drm_test_buddy_alloc_optimistic()
618 order); in drm_test_buddy_alloc_optimistic()
716 "block order(%d) != %d\n", in drm_test_buddy_alloc_limit()