mbox series

[0/4] dm-thin: reduce lock contention when walking the btree

Message ID alpine.LRH.2.02.2210100811400.25650@file01.intranet.prod.int.rdu2.redhat.com (mailing list archive)
Headers show
Series dm-thin: reduce lock contention when walking the btree | expand

Message

Mikulas Patocka Oct. 10, 2022, 12:35 p.m. UTC
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@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel