Skip to contentSkip to conversation

vhost: remove lockless enqueue to virt ring

RFC PATCH Xie, Huawei 3 participants 5 messages Nov 5, 2015 – Nov 6, 2015 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

If no objections, would remove the internal cmpset enqueue, should get some improved performance.

No idea why commit message is lost:
DPDK doesn't support receiving/transmitting packets from/to the same port/queue.
Vhost pmd wraps vhost device as normal dpdk port. dpdkvhost based applications/switch
also treate virtio port and physical port both as ports, and have
their own
lock implmentation when to enqueue packets to the same port. This patch removes
the internal lockless vhost enqueue implmentation.

Quoted 1 line · Huawei Xie
#2 lore raw
Quoted 15 lines · Huawei

If no objections, would remove the internal cmpset enqueue, should get some improved performance.

No idea why commit message is lost:
DPDK doesn't support receiving/transmitting packets from/to the same port/queue.
Vhost pmd wraps vhost device as normal dpdk port. dpdkvhost based applications/switch
also treate virtio port and physical port both as ports, and have
their own
lock implmentation when to enqueue packets to the same port. This patch removes
the internal lockless vhost enqueue implmentation.

Quoted 1 line · Huawei Xie

Hi Xie,

I think it's a good optimization.
But I guess the patch will changes behavior of vhost library API. For example, if someone has already implemented an application based on the assumption that vhost library has internal lock, I doubt their application will face an issue with this patch.

If it's correct, we might need to follow below steps.
http://dpdk.org/doc/guides/contributing/versioning.html

Thanks,
Tetsuya

#4 lore raw
In reply to Xie, Huawei
Quoted 10 lines

From: [email protected]
To: [email protected]; [email protected]
Date: Thu, 5 Nov 2015 10:21:41 +0000
CC: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [RFC PATCH] vhost: remove lockless enqueue to virt ring

If no objections, would remove the internal cmpset enqueue, should get some improved performance.

I think it is good.The vhost sample also need some changes for this modification.do we have the percentage of gaining when removing the lock?

thanks and regards,Changchun

Quoted 14 lines

No idea why commit message is lost:
DPDK doesn't support receiving/transmitting packets from/to the same port/queue.
Vhost pmd wraps vhost device as normal dpdk port. dpdkvhost based applications/switch
also treate virtio port and physical port both as ports, and have
their own
lock implmentation when to enqueue packets to the same port. This patch removes
the internal lockless vhost enqueue implmentation.

Quoted 1 line · Huawei Xie
#3 lore raw
In reply to Tetsuya Mukawa
Quoted 15 lines · Tetsuya Mukawa
Quoted 14 lines · Huawei

If no objections, would remove the internal cmpset enqueue, should get some improved performance.

No idea why commit message is lost:
DPDK doesn't support receiving/transmitting packets from/to the same port/queue.
Vhost pmd wraps vhost device as normal dpdk port. dpdkvhost based applications/switch
also treate virtio port and physical port both as ports, and have
their own
lock implmentation when to enqueue packets to the same port. This patch removes
the internal lockless vhost enqueue implmentation.
On 11/5/2015 5:38 PM, Huawei Xie wrote:

Quoted 8 lines
Quoted 1 line
Quoted 1 line

Hi Xie,

I think it's a good optimization.
But I guess the patch will changes behavior of vhost library API. For example, if someone has already implemented an application based on the assumption that vhost library has internal lock, I doubt their application will face an issue with this patch.

Yes, i understand. If we have an improper implementation, we fix it as early as possible. I prefer to remove the internal lock currently. The last thing i want to do is maintain two APIs.
Would follow the ABI process.

Quoted 7 lines

If it's correct, we might need to follow below steps.
http://dpdk.org/doc/guides/contributing/versioning.html

Thanks,
Tetsuya

#5 lore raw
In reply to Changchun Ouyang
Quoted 7 lines · Changchun Ouyang
Quoted 7 lines

From: [email protected]
To: [email protected]; [email protected]
Date: Thu, 5 Nov 2015 10:21:41 +0000
CC: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [RFC PATCH] vhost: remove lockless enqueue

Quoted 8 lines

to virt ring

Quoted 3 lines

If no objections, would remove the internal cmpset enqueue, should get some improved performance.

I think it is good.
The vhost sample also need some changes for this modification. do we have the percentage of gaining when removing the lock?

The atomic cmpset is a costly operation.
We plan to implement vhost/virtio performance test example, which will cover the most common scenarios.
/huawei

Quoted 4 lines

thanks and regards,
Changchun