Hi all:<br><br>The following code snippet is sited from drbd_work.c<br><br>function drbd_work<br><br>int drbd_worker(struct drbd_thread *thi)<br>{<br>.....<br><br> if (down_trylock(&mdev->data.work.s))<br>
{<br><br><br> mutex_lock(&mdev->data.mutex);<br> if (mdev->data.socket && !mdev->net_conf->no_cork)<br> drbd_tcp_uncork(mdev->data.socket);<br>
mutex_unlock(&mdev->data.mutex);<br><br> intr = <span style="background-color: rgb(255, 255, 0);">down_interruptible(&mdev->data.work.s);</span><br><br> mutex_lock(&mdev->data.mutex);<br>
if (mdev->data.socket && !mdev->net_conf->no_cork)<br> drbd_tcp_cork(mdev->data.socket);<br> mutex_unlock(&mdev->data.mutex);<br>
}<br> ...............<br><br>}<br><br>I did a little performance test which shows <span style="background-color: rgb(255, 255, 0);">down_interruptible <span style="background-color: rgb(255, 255, 255);">spend 0.1 million second each run on average.</span></span> I am using primary/secondary configuration with replication over 10G Ethernet dedication connection. <br>
<br>The test result was yielded by running dd if=/dev/zero of=/dev/drbd1 <span style="background-color: rgb(255, 255, 0);">bs=4k</span> count=100000 oflag=direct. Here is the result:<br><span style="background-color: rgb(255, 255, 0);">409600000 bytes (410 MB) copied, 25.9126 seconds, 15.8 MB/s</span>. It says that DRBD is capable of processing roughly 5000 IO per second. I believe this result has everything to do with down_interruptible that mentions above. Interesting thing is, I don`t see anywhere semephore <span style="background-color: rgb(255, 255, 0);">mdev->data.work.s<br>
<span style="background-color: rgb(255, 255, 255);">get incremented.</span><br style="background-color: rgb(255, 255, 255);"><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">can somebody give me a hint?</span><br style="background-color: rgb(255, 255, 255);">
<br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">Thanks</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">Ben</span><br>
</span><br><br clear="all">Commit yourself to constant self-improvement<br>