[dm-devel] a problem about dm_kcopyd_copy()

lihuiba magazine.lihuiba at 163.com
Mon Apr 21 12:45:34 UTC 2014


Hello,


I'm new to kernel programming, and I'm writing a DM target that implements a Copy-on-Read
cache. The code is close to complete (I think), but I come across a problem that I can't figure
out.


When the cache block size (CBS) is 32KB, 64KB or 128KB, fio stress test is highly likely to
cause dm_kcopyd_copy() to dead lock. There would be hundreds of dm_kcopyd_copy() 
job issued, but none of them will ever complete. CPU usage will go down to 0% after the
problem occurs. The problem never occurs when CBS is 256KB or larger. CBS is also the
size of every dm_kcopyd_copy() job. The fio tests use libaio as I/O engine to test random read, 
I/O block size rangs from 512B, 1KB, 2KB, 4KB, 16KB to 4MB. fio spawns threads as many as CPU hardware threads, each with I/O depth=128.


Please give me some suggestions about where the problem might be, or any other comments
that may help. My code can be found at: https://github.com/lihuiba/dm-foolcache


Thank you, very much!



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20140421/ff17f433/attachment.htm>


More information about the dm-devel mailing list