aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/bus_dma.h
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2017-07-01 05:27:40 +0000
committerAlan Cox <alc@FreeBSD.org>2017-07-01 05:27:40 +0000
commit545414213d777df779948c28b21d3d81c12bff20 (patch)
tree3a713fdbde3c8866e0c22020e38eeb16fa24fd6c /sys/sparc64/include/bus_dma.h
parent4d81e1452894d4086d2283611bc34a88f3ed37e1 (diff)
Change blst_leaf_alloc() to handle a cursor argument, and to improve
performance. To find in the leaf bitmap all ranges of sufficient length, use a doubling strategy with shift-and-and until each bit still set represents a bit sequence of length 'count', or until the bitmask is zero. In the latter case, update the hint based on the first bit sequence length not found to be available. For example, seeking an interval of length 12, the set bits of the bitmap would represent intervals of length 1, then 2, then 3, then 6, then 12. If no bits are set at the point when each bit represents an interval of length 6, then the hint can be updated to 5 and the search terminated. If long-enough intervals are found, discard those before the cursor. If any remain, use binary search to find the position of the first of them, and allocate that interval. Submitted by: Doug Moore <dougm@rice.edu> Reviewed by: kib, markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D11426
Notes
Notes: svn path=/head/; revision=320527
Diffstat (limited to 'sys/sparc64/include/bus_dma.h')
0 files changed, 0 insertions, 0 deletions