Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi all:
The following code snippet is sited from drbd_work.c
function drbd_work
int drbd_worker(struct drbd_thread *thi)
{
.....
if (down_trylock(&mdev->data.work.s))
{
mutex_lock(&mdev->data.mutex);
if (mdev->data.socket && !mdev->net_conf->no_cork)
drbd_tcp_uncork(mdev->data.socket);
mutex_unlock(&mdev->data.mutex);
intr = down_interruptible(&mdev->data.work.s);
mutex_lock(&mdev->data.mutex);
if (mdev->data.socket && !mdev->net_conf->no_cork)
drbd_tcp_cork(mdev->data.socket);
mutex_unlock(&mdev->data.mutex);
}
...............
}
I did a little performance test which shows down_interruptible spend 0.1
million second each run on average. I am using primary/secondary
configuration with replication over 10G Ethernet dedication connection.
The test result was yielded by running dd if=/dev/zero of=/dev/drbd1
bs=4kcount=100000 oflag=direct. Here is the result:
409600000 bytes (410 MB) copied, 25.9126 seconds, 15.8 MB/s. 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 mdev->data.work.s
get incremented.
can somebody give me a hint?
Thanks
Ben
Commit yourself to constant self-improvement
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100927/45cfff3e/attachment.htm>