Re: [PATCH v7] i2c: virtio: add a virtio i2c frontend driver

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

 




On 2021/3/15 15:52, Arnd Bergmann wrote:
On Mon, Mar 15, 2021 at 6:54 AM Jie Deng <jie.deng@xxxxxxxxx> wrote:
On 2021/3/15 11:13, Jason Wang wrote:
On 2021/3/15 9:14 上午, Jie Deng wrote:
On 2021/3/12 16:58, Arnd Bergmann wrote:
Then do you think it is necessary to mark the virtio bufs with
____cacheline_aligned ?
I think so, yes.

I haven't seen any virtio interface being marked yet. If this is a
problem, I believe it should  be common for all virtio devices, right ?
Yes, but it's not a problem if the buffers are allocated separately
because kmalloc provinces a cachelinen aligned buffer on architectures
that need it.

It's only a problem here because there is a single allocation for three
objects that have different ownership states during the DMA (device
owned to-device, cpu-owned, device owned to-cpu).

        Arnd
I'm not sure if this will actually cause a problem. But I'm OK to mark the items in struct virtio_i2c_req with  ____cacheline_aligned to avoid potential problem
as you said.

Thank you.

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux