aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorOmar Sandoval <[email protected]>2016-09-17 01:28:26 -0700
committerJens Axboe <[email protected]>2016-09-17 08:39:16 -0600
commit05fd095d53b979878f016c3a7080d3683cc89d72 (patch)
tree93751c669d2cba783d4762127efa949ad4bda5f9 /lib/mpi/mpiutil.c
parent98d95416dbfaf4910caadfb4ddc75e4aacbdff8c (diff)
sbitmap: re-initialize allocation hints after resize
After a struct sbitmap_queue is resized smaller, the allocation hints may still be set to bits beyond the new depth of the bitmap. This means that, for example, if the number of blk-mq tags is reduced through sysfs, more requests than the nominal queue depth may be in flight. It's tempting to fix this at resize time by doing a one-time reinitialization of the hints, but this can race with __sbitmap_queue_get() updating the hint. Instead, check the hint before we use it. This caused no measurable performance difference in my synthetic benchmarks. Signed-off-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions