Lines Matching refs:bits
345 int *bits) in pcpu_next_md_free_region() argument
351 *bits = 0; in pcpu_next_md_free_region()
355 if (*bits) { in pcpu_next_md_free_region()
356 *bits += block->left_free; in pcpu_next_md_free_region()
370 *bits = block->contig_hint; in pcpu_next_md_free_region()
371 if (*bits && block->contig_hint_start >= block_off && in pcpu_next_md_free_region()
372 *bits + block->contig_hint_start < PCPU_BITMAP_BLOCK_BITS) { in pcpu_next_md_free_region()
380 *bits = block->right_free; in pcpu_next_md_free_region()
400 int align, int *bit_off, int *bits) in pcpu_next_fit_region() argument
406 *bits = 0; in pcpu_next_fit_region()
410 if (*bits) { in pcpu_next_fit_region()
411 *bits += block->left_free; in pcpu_next_fit_region()
412 if (*bits >= alloc_bits) in pcpu_next_fit_region()
419 *bits = ALIGN(block->contig_hint_start, align) - in pcpu_next_fit_region()
427 block->contig_hint >= *bits + alloc_bits) { in pcpu_next_fit_region()
430 *bits += alloc_bits + block->contig_hint_start - in pcpu_next_fit_region()
440 *bits = PCPU_BITMAP_BLOCK_BITS - *bit_off; in pcpu_next_fit_region()
442 if (*bits >= alloc_bits) in pcpu_next_fit_region()
456 #define pcpu_for_each_md_free_region(chunk, bit_off, bits) \ argument
457 for (pcpu_next_md_free_region((chunk), &(bit_off), &(bits)); \
459 (bit_off) += (bits) + 1, \
460 pcpu_next_md_free_region((chunk), &(bit_off), &(bits)))
462 #define pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) \ argument
464 &(bits)); \
466 (bit_off) += (bits), \
468 &(bits)))
669 int bits) in pcpu_block_update_scan() argument
672 int e_off = s_off + bits; in pcpu_block_update_scan()
704 int bit_off, bits; in pcpu_chunk_refresh_hint() local
717 bits = 0; in pcpu_chunk_refresh_hint()
718 pcpu_for_each_md_free_region(chunk, bit_off, bits) in pcpu_chunk_refresh_hint()
719 pcpu_block_update(chunk_md, bit_off, bit_off + bits); in pcpu_chunk_refresh_hint()
766 int bits) in pcpu_block_update_hint_alloc() argument
781 e_index = pcpu_off_to_block_index(bit_off + bits - 1); in pcpu_block_update_hint_alloc()
783 e_off = pcpu_off_to_block_off(bit_off + bits - 1) + 1; in pcpu_block_update_hint_alloc()
801 s_off + bits); in pcpu_block_update_hint_alloc()
806 s_off + bits)) in pcpu_block_update_hint_alloc()
813 s_off + bits)) { in pcpu_block_update_hint_alloc()
878 bit_off + bits)) in pcpu_block_update_hint_alloc()
890 bit_off + bits)) in pcpu_block_update_hint_alloc()
913 int bits) in pcpu_block_update_hint_free() argument
928 e_index = pcpu_off_to_block_index(bit_off + bits - 1); in pcpu_block_update_hint_free()
930 e_off = pcpu_off_to_block_off(bit_off + bits - 1) + 1; in pcpu_block_update_hint_free()
1022 static bool pcpu_is_populated(struct pcpu_chunk *chunk, int bit_off, int bits, in pcpu_is_populated() argument
1028 page_end = PFN_UP((bit_off + bits) * PCPU_MIN_ALLOC_SIZE); in pcpu_is_populated()
1062 int bit_off, bits, next_off; in pcpu_find_block_fit() local
1076 bits = 0; in pcpu_find_block_fit()
1077 pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) { in pcpu_find_block_fit()
1078 if (!pop_only || pcpu_is_populated(chunk, bit_off, bits, in pcpu_find_block_fit()
1083 bits = 0; in pcpu_find_block_fit()
1230 int bit_off, bits, end, oslot, freed; in pcpu_free_area() local
1242 bits = end - bit_off; in pcpu_free_area()
1243 bitmap_clear(chunk->alloc_map, bit_off, bits); in pcpu_free_area()
1245 freed = bits * PCPU_MIN_ALLOC_SIZE; in pcpu_free_area()
1253 pcpu_block_update_hint_free(chunk, bit_off, bits); in pcpu_free_area()
1691 size_t bits, bit_align; in pcpu_alloc() local
1709 bits = size >> PCPU_MIN_ALLOC_SHIFT; in pcpu_alloc()
1744 off = pcpu_find_block_fit(chunk, bits, bit_align, is_atomic); in pcpu_alloc()
1750 off = pcpu_alloc_area(chunk, bits, bit_align, off); in pcpu_alloc()
1762 off = pcpu_find_block_fit(chunk, bits, bit_align, in pcpu_alloc()
1770 off = pcpu_alloc_area(chunk, bits, bit_align, off); in pcpu_alloc()