Home
last modified time | relevance | path

Searched refs:nr_pieces (Results 1 – 2 of 2) sorted by relevance

/linux/mm/damon/tests/
H A Dvaddr-kunit.h250 unsigned long start, unsigned long end, unsigned int nr_pieces) in damon_test_split_evenly_fail() argument
257 damon_va_evenly_split_region(t, r, nr_pieces), -EINVAL); in damon_test_split_evenly_fail()
269 unsigned long start, unsigned long end, unsigned int nr_pieces) in damon_test_split_evenly_succ() argument
273 unsigned long expected_width = (end - start) / nr_pieces; in damon_test_split_evenly_succ()
278 damon_va_evenly_split_region(t, r, nr_pieces), 0); in damon_test_split_evenly_succ()
279 KUNIT_EXPECT_EQ(test, damon_nr_regions(t), nr_pieces); in damon_test_split_evenly_succ()
282 if (i == nr_pieces - 1) { in damon_test_split_evenly_succ()
/linux/mm/damon/
H A Dvaddr.c60 * Size-evenly split a region into 'nr_pieces' small regions
65 struct damon_region *r, unsigned int nr_pieces) in damon_va_evenly_split_region() argument
72 if (!r || !nr_pieces) in damon_va_evenly_split_region()
75 if (nr_pieces == 1) in damon_va_evenly_split_region()
80 sz_piece = ALIGN_DOWN(sz_orig / nr_pieces, DAMON_MIN_REGION); in damon_va_evenly_split_region()
87 for (start = r->ar.end, i = 1; i < nr_pieces; start += sz_piece, i++) { in damon_va_evenly_split_region()
244 unsigned long sz = 0, nr_pieces; in __damon_va_init_regions()
273 nr_pieces = (regions[i].end - regions[i].start) / sz; in __damon_va_init_regions()
274 damon_va_evenly_split_region(t, r, nr_pieces);
241 unsigned long sz = 0, nr_pieces; __damon_va_init_regions() local