RE: [PATCH V2 1/4] misc: vop: change the way of allocating vring

2020-09-29 Thread Sherry Sun
Hi Christoph, > > > + vr->va = dma_alloc_coherent(vop_dev(vdev), vr_size, > _addr, > > +GFP_KERNEL); > > Please stick to 80 character lines unless you have a really good reason not > to. Okay, will change it in V3. Regards Sherry

Re: [PATCH V2 1/4] misc: vop: change the way of allocating vring

2020-09-29 Thread Christoph Hellwig
> + vr->va = dma_alloc_coherent(vop_dev(vdev), vr_size, _addr, > GFP_KERNEL); Please stick to 80 character lines unless you have a really good reason not to.

[PATCH V2 1/4] misc: vop: change the way of allocating vring

2020-09-29 Thread Sherry Sun
Allocate vrings use dma_alloc_coherent is a common way in kernel. As the memory interacted between two systems should use consistent memory to avoid caching effects. The orginal way use __get_free_pages and dma_map_single to allocate and map vring, but not use dma_sync_single_for_cpu/device api