dm cache policy smq: change the mutex to a spinlock
authorJoe Thornber <ejt@redhat.com>
Fri, 26 Jun 2015 12:25:12 +0000 (13:25 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 12 Aug 2015 15:32:19 +0000 (11:32 -0400)
commit4051aab762f161826f15ea63c8baaf33cb5e6fe3
treec4435cbfd451b46cb7cac41a5be8e763192d7c3b
parent34dd051741572859bc1fef525c5ddbc127158b52
dm cache policy smq: change the mutex to a spinlock

We no longer sleep in any of the smq functions, so this can become a
spinlock.  Switching from mutex to spinlock improves performance when
the fast cache device is a very low latency device (e.g. NVMe SSD).

The switch to spinlock also allows for removal of the extra tick_lock;
which is no longer needed since the main lock being a spinlock now
fulfills the locking requirements needed by interrupt context.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-smq.c