Hi Maxime, > -----Original Message----- > From: Maxime Coquelin <maxime.coque...@redhat.com> > Sent: Tuesday, July 21, 2020 4:35 PM > To: Fu, Patrick <patrick...@intel.com>; dev@dpdk.org; Xia, Chenbo > <chenbo....@intel.com> > Subject: Re: [PATCH v1] vhost: support cross page buf in async data path > > Hi Patrick, > > On 7/21/20 4:57 AM, Fu, Patrick wrote: > > Hi Maxime, > > > >> -----Original Message----- > >> From: Maxime Coquelin <maxime.coque...@redhat.com> > >> Sent: Tuesday, July 21, 2020 12:40 AM > >> To: Fu, Patrick <patrick...@intel.com>; dev@dpdk.org; Xia, Chenbo > >> <chenbo....@intel.com> > >> Subject: Re: [PATCH v1] vhost: support cross page buf in async data > >> path > >> > >> The title could be improved, it is not very clear IMHO. > > How about: > > vhost: fix async copy failure on buffers cross page boundary > > > >> On 7/20/20 4:52 AM, patrick...@intel.com wrote: > >>> From: Patrick Fu <patrick...@intel.com> > >>> > >>> Async copy fails when ring buffer cross two physical pages. This > >>> patch fix the failure by letting copies occur in sync mode if > >>> crossing page buffers are given. > >> > >> Wouldn't it be possible to have the buffer split into two iovecs? > > Technically we can do that, however, it will also introduce significant > overhead: > > - overhead from adding additional logic in vhost async data path to > > handle the case > > - overhead from dma device to consume 2 iovecs In average, I don't > > think dma copy can benefit too much for the buffer which are split into > multiple pages. > > CPU copy shall be a more suitable method. > > I think we should try, that would make a cleaner implementation. I don't > think having to fallback to sync mode is a good idea because it adds an > overhead on the CPU, which is what we try to avoid with this async mode. > > Also, I am not convinced the overhead would be that significant, at least I > hope so, otherwise it would mean this new path is just performing better > because it takes a lot of shortcuts, like the vector path in Virtio PMD.
I can make a trial patch and do some comparison. I will try to feedback the result by this weekend. Thanks, Patrick