On 12/9/2015 11:41 AM, Yuanhan Liu wrote:
> On Wed, Dec 09, 2015 at 03:33:16AM +0000, Xie, Huawei wrote:
> ...
>>>> +static inline void __attribute__((always_inline))
>>>> +vhost_log_write(struct virtio_net *dev, struct vhost_virtqueue *vq,
>>>> + uint64_t offset, uint64_t len)
>>>> +{
>>>> + uint64_t addr = vq->log_guest_addr;
>>>> + uint64_t page;
>>>> +
>>>> + if (unlikely(((dev->features & (1ULL << VHOST_F_LOG_ALL)) == 0) ||
>>>> + !dev->log_base || !len))
>>>> + return;
>>> Isn't "likely" more appropriate in above, since the whole
>>> expression is expected to be true most of the time?
>> Victor:
>> So we are not always logging, what is the message that tells the backend
>> the migration is started?
> When log starts, VHOST_USER_SET_FEATURES request will be sent again,
> with VHOST_F_LOG_ALL feature bit set.
As the VHOST_USER_SET_FEATURES handling and rx/tx runs asynchronously,
we have to make sure we don't miss logging anything when this feature is
set. For example, I doubt like in virtio_dev_rx, is the dev->features
volatile?
> --yliu
>- [dpdk-dev] [PATCH 1/4] vhost:... Thomas Monjalon
- [dpdk-dev] [PATCH 1/4] vhost:... Panu Matilainen
- [dpdk-dev] [PATCH 1/4] vhost:... Thomas Monjalon
- [dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SE... Xie, Huawei
- [dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write Yuanhan Liu
- [dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_... Victor Kaplansky
- [dpdk-dev] [PATCH 2/4] vhost: introduce vhost_... Yuanhan Liu
- [dpdk-dev] [PATCH 2/4] vhost: introduce vhost_... Xie, Huawei
- [dpdk-dev] [PATCH 2/4] vhost: introduce vh... Yuanhan Liu
- [dpdk-dev] [PATCH 2/4] vhost: introduc... Xie, Huawei
- [dpdk-dev] [PATCH 2/4] vhost: int... Yuanhan Liu
- [dpdk-dev] [PATCH 3/4] vhost: log vring changes Yuanhan Liu
- [dpdk-dev] [PATCH 3/4] vhost: log vring changes Victor Kaplansky
- [dpdk-dev] [PATCH 3/4] vhost: log vring change... Yuanhan Liu
- [dpdk-dev] [PATCH 3/4] vhost: log vring ch... Victor Kaplansky
- [dpdk-dev] [PATCH 3/4] vhost: log vrin... Michael S. Tsirkin
- [dpdk-dev] [PATCH 3/4] vhost: log... Yuanhan Liu
- [dpdk-dev] [PATCH 3/4] vhost: log vring change... Xie, Huawei
- [dpdk-dev] [PATCH 4/4] vhost: enable log_shmfd protocol... Yuanhan Liu
- [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migratio... Victor Kaplansky

