[PATCH 2/2] Fix a crash when block device is read and block size is changed at the same time

2012-09-25 Thread Mikulas Patocka
blockdev: turn a rw semaphore into a percpu rw semaphore This avoids cache line bouncing when many processes lock the semaphore for read. New percpu lock implementation The lock consists of an array of percpu unsigned integers, a boolean variable and a mutex. When we take the lock for read, we

[PATCH 2/2] Fix a crash when block device is read and block size is changed at the same time

2012-09-25 Thread Mikulas Patocka
blockdev: turn a rw semaphore into a percpu rw semaphore This avoids cache line bouncing when many processes lock the semaphore for read. New percpu lock implementation The lock consists of an array of percpu unsigned integers, a boolean variable and a mutex. When we take the lock for read, we