<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hello,<div><br></div><div>I'm new to kernel programming, and I'm writing a DM target that implements a Copy-on-Read</div><div>cache. The code is close to complete (I think), but I come across a problem that I can't figure</div><div>out.</div><div><br></div><div>When the cache block size (CBS) is 32KB, 64KB or 128KB, fio stress test is highly likely to</div><div>cause dm_kcopyd_copy() to dead lock. There would be hundreds of dm_kcopyd_copy() </div><div>job issued, but none of them will ever complete. CPU usage will go down to 0% after the</div><div>problem occurs. The problem never occurs when CBS is 256KB or larger. CBS is also the</div><div>size of every dm_kcopyd_copy() job. The fio tests use libaio as I/O engine to test random read, </div><div>I/O block size rangs from 512B, 1KB, 2KB, 4KB, 16KB to 4MB. fio spawns threads <span style="font-size: 14px; line-height: 1.7;">as many as CPU hardware threads, each with I/O depth=128.</span></div><div><span style="font-size: 14px; line-height: 1.7;"><br></span></div><div>Please give me some suggestions about where the problem might be, or any other comments</div><div>that may help. My code can be found at: <a href="https://github.com/lihuiba/dm-foolcache" target="_blank" style="font-size: 14px; line-height: 1.7;">https://github.com/lihuiba/dm-foolcache</a></div><div><br></div><div>Thank you, very much!</div><div><br></div><div><br></div></div>