Hi Here I'm sending the patches for dm-bufio and dm-thin that reduce lock contention when processing I/Os on already provisioned space. The first patch introduces a new API to dm-bufio that allows to lock bufio and do multiple queries. The second patch switches dm-bufio lock from mutex to rm_semaphore, so that we can process queries from multiple processes simultaneously. The third patch simplifies struct ro_spine so that it holds a pointer to just one buffer. The fourth patch makes dm-thin use the new dm-bufio interface when walking a btree. I tested it on persistent memory (emulated with the "memmap" kernel argument). I set up the test with these commands: # vgcreate vg /dev/pmem0 # lvcreate --thinpool pool -L 32GiB vg # lvcreate -V 16GiB -n thin --thinpool pool vg # dd if=/dev/zero of=/dev/vg/thin bs=1M oflag=direct status=progress Then I used # fio --ioengine=psync --iodepth=1 --rw=randrw --bs=4k --direct=1 --numjobs=12 --time_based --runtime=10 --group_reporting --name=/dev/vg/thin Throughput before the patches: READ: bw=286MiB/s WRITE: bw=286MiB/s Throughput after the patches: READ: bw=442MiB/s WRITE: bw=442MiB/s Mikulas -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel