qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] Re: [PATCH v2 3/7] migration/multifd: Zero page transmiss


From: Hao Xiang
Subject: Re: [External] Re: [PATCH v2 3/7] migration/multifd: Zero page transmission on the multifd thread.
Date: Sat, 24 Feb 2024 11:06:14 -0800

On Thu, Feb 22, 2024 at 8:38 PM Hao Xiang <hao.xiang@bytedance.com> wrote:
>
> On Fri, Feb 16, 2024 at 9:08 PM Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > On 2/16/24 12:39, Hao Xiang wrote:
> > > +void multifd_zero_page_check_recv(MultiFDRecvParams *p)
> > > +{
> > > +    for (int i = 0; i < p->zero_num; i++) {
> > > +        void *page = p->host + p->zero[i];
> > > +        if (!buffer_is_zero(page, p->page_size)) {
> > > +            memset(page, 0, p->page_size);
> > > +        }
> > > +    }
> > > +}
> >
> > You should not check the buffer is zero here, you should just zero it.
>
> I will fix it in the next version.

I tested with zero out all pages but the performance is bad compared
to previously. In my test case, most pages are zero pages. I think
what happened is that the destination host already has the pages being
zero so performing a memcmp is much faster than memset on all zero
pages.

>
> >
> >
> > r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]