Re: [PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-07 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 08:04:45PM +0800, Jason Wang wrote: > > On 2020/6/3 下午5:48, Michael S. Tsirkin wrote: > > On Wed, Jun 03, 2020 at 03:13:56PM +0800, Jason Wang wrote: > > > On 2020/6/2 下午9:05, Michael S. Tsirkin wrote: > > > [...] > > > > > > + > > > > +static int

Re: [PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-03 Thread Jason Wang
On 2020/6/3 下午5:48, Michael S. Tsirkin wrote: On Wed, Jun 03, 2020 at 03:13:56PM +0800, Jason Wang wrote: On 2020/6/2 下午9:05, Michael S. Tsirkin wrote: [...] + +static int fetch_indirect_descs(struct vhost_virtqueue *vq, + struct vhost_desc *indirect, +

Re: [PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-03 Thread Michael S. Tsirkin
On Wed, Jun 03, 2020 at 03:13:56PM +0800, Jason Wang wrote: > > On 2020/6/2 下午9:05, Michael S. Tsirkin wrote: > > The idea is to support multiple ring formats by converting > > to a format-independent array of descriptors. > > > > This costs extra cycles, but we gain in ability > > to fetch a

Re: [PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-03 Thread Jason Wang
On 2020/6/2 下午9:05, Michael S. Tsirkin wrote: The idea is to support multiple ring formats by converting to a format-independent array of descriptors. This costs extra cycles, but we gain in ability to fetch a batch of descriptors in one go, which is good for code cache locality. When used,

[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct

2020-06-02 Thread Michael S. Tsirkin
The idea is to support multiple ring formats by converting to a format-independent array of descriptors. This costs extra cycles, but we gain in ability to fetch a batch of descriptors in one go, which is good for code cache locality. When used, this causes a minor performance degradation, it's