Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-13 Thread Koichiro Den
Sorry I mistakenly focused on NET case, please pass it over. I will do any relevant suggestion in patch-based way. Thanks. On Sun, 2017-08-13 at 23:11 +0900, Koichiro Den wrote: > Thanks for your comments, Michael and Jason. And I'm sorry about late > response. > To be honest, I am on a summer

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-13 Thread Koichiro Den
Thanks for your comments, Michael and Jason. And I'm sorry about late response. To be honest, I am on a summer vacation until next Tuesday. I noticed that what I wrote was not sufficient. Regardless of caching mechanism existence, the "event" could legitimately be at any point out of the latest

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-08 Thread Michael S. Tsirkin
On Wed, Aug 09, 2017 at 10:38:10AM +0800, Jason Wang wrote: > I think don't think current code can work well if vq.num is grater than > 2^15. Since all cached idx is u16. This looks like a bug which needs to be > fixed. That's a limitation of virtio 1.0. > > * else if the interval of vq.num is

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-08-08 Thread Jason Wang
On 2017年07月30日 14:26, K. Den wrote: On Wed, 2017-07-26 at 19:08 +0300, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 09:37:15PM +0800, Jason Wang wrote: On 2017年07月26日 21:18, Jason Wang wrote: On 2017年07月26日 20:57, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 04:03:17PM +0800,

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-30 Thread K. Den
On Wed, 2017-07-26 at 19:08 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 26, 2017 at 09:37:15PM +0800, Jason Wang wrote: > > > > > > On 2017年07月26日 21:18, Jason Wang wrote: > > > > > > > > > On 2017年07月26日 20:57, Michael S. Tsirkin wrote: > > > > On Wed, Jul 26, 2017 at 04:03:17PM +0800,

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2017 at 09:37:15PM +0800, Jason Wang wrote: > > > On 2017年07月26日 21:18, Jason Wang wrote: > > > > > > On 2017年07月26日 20:57, Michael S. Tsirkin wrote: > > > On Wed, Jul 26, 2017 at 04:03:17PM +0800, Jason Wang wrote: > > > > This reverts commit

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Jason Wang
On 2017年07月26日 21:18, Jason Wang wrote: On 2017年07月26日 20:57, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 04:03:17PM +0800, Jason Wang wrote: This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it was reported to break vhost_net. We want to cache used event and use it

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Jason Wang
On 2017年07月26日 20:57, Michael S. Tsirkin wrote: On Wed, Jul 26, 2017 at 04:03:17PM +0800, Jason Wang wrote: This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it was reported to break vhost_net. We want to cache used event and use it to check for notification. We try to valid

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2017 at 04:03:17PM +0800, Jason Wang wrote: > This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it > was reported to break vhost_net. We want to cache used event and use > it to check for notification. We try to valid cached used event by > checking whether or not

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Jason Wang
On 2017年07月26日 18:53, Christian Borntraeger wrote: On 07/26/2017 10:03 AM, Jason Wang wrote: This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it was reported to break vhost_net. We want to cache used event and use it to check for notification. We try to valid cached used

Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Christian Borntraeger
On 07/26/2017 10:03 AM, Jason Wang wrote: > This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it > was reported to break vhost_net. We want to cache used event and use > it to check for notification. We try to valid cached used event by > checking whether or not it was ahead of

[PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Jason Wang
This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it was reported to break vhost_net. We want to cache used event and use it to check for notification. We try to valid cached used event by checking whether or not it was ahead of new, but this is not correct all the time, it could