Lines Matching refs:rs
273 static void pcpu_next_unpop(unsigned long *bitmap, int *rs, int *re, int end) in pcpu_next_unpop() argument
275 *rs = find_next_zero_bit(bitmap, end, *rs); in pcpu_next_unpop()
276 *re = find_next_bit(bitmap, end, *rs + 1); in pcpu_next_unpop()
279 static void pcpu_next_pop(unsigned long *bitmap, int *rs, int *re, int end) in pcpu_next_pop() argument
281 *rs = find_next_bit(bitmap, end, *rs); in pcpu_next_pop()
282 *re = find_next_zero_bit(bitmap, end, *rs + 1); in pcpu_next_pop()
290 #define pcpu_for_each_unpop_region(bitmap, rs, re, start, end) \ argument
291 for ((rs) = (start), pcpu_next_unpop((bitmap), &(rs), &(re), (end)); \
292 (rs) < (re); \
293 (rs) = (re) + 1, pcpu_next_unpop((bitmap), &(rs), &(re), (end)))
295 #define pcpu_for_each_pop_region(bitmap, rs, re, start, end) \ argument
296 for ((rs) = (start), pcpu_next_pop((bitmap), &(rs), &(re), (end)); \
297 (rs) < (re); \
298 (rs) = (re) + 1, pcpu_next_pop((bitmap), &(rs), &(re), (end)))
752 int rs, re, start; /* region start, region end */ in pcpu_block_refresh_hint() local
768 pcpu_for_each_unpop_region(alloc_map, rs, re, start, in pcpu_block_refresh_hint()
770 pcpu_block_update(block, rs, re); in pcpu_block_refresh_hint()
1044 int page_start, page_end, rs, re; in pcpu_is_populated() local
1049 rs = page_start; in pcpu_is_populated()
1050 pcpu_next_unpop(chunk->populated, &rs, &re, page_end); in pcpu_is_populated()
1051 if (rs >= page_end) in pcpu_is_populated()
1705 int page_start, page_end, rs, re; in pcpu_alloc() local
1710 pcpu_for_each_unpop_region(chunk->populated, rs, re, in pcpu_alloc()
1714 ret = pcpu_populate_chunk(chunk, rs, re, pcpu_gfp); in pcpu_alloc()
1722 pcpu_chunk_populated(chunk, rs, re); in pcpu_alloc()
1861 int rs, re; in pcpu_balance_workfn() local
1863 pcpu_for_each_pop_region(chunk->populated, rs, re, 0, in pcpu_balance_workfn()
1865 pcpu_depopulate_chunk(chunk, rs, re); in pcpu_balance_workfn()
1867 pcpu_chunk_depopulated(chunk, rs, re); in pcpu_balance_workfn()
1896 int nr_unpop = 0, rs, re; in pcpu_balance_workfn() local
1913 pcpu_for_each_unpop_region(chunk->populated, rs, re, 0, in pcpu_balance_workfn()
1915 int nr = min(re - rs, nr_to_pop); in pcpu_balance_workfn()
1917 ret = pcpu_populate_chunk(chunk, rs, rs + nr, gfp); in pcpu_balance_workfn()
1921 pcpu_chunk_populated(chunk, rs, rs + nr); in pcpu_balance_workfn()