From: David Laight <David.Laight@ACULAB.COM>
To: 'Sherry Sun' <sherry.sun@nxp.com>, Christoph Hellwig <hch@infradead.org>
Cc: "sudeep.dutt@intel.com" <sudeep.dutt@intel.com>,
"ashutosh.dixit@intel.com" <ashutosh.dixit@intel.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"kishon@ti.com" <kishon@ti.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH V2 2/4] misc: vop: do not allocate and reassign the used ring
Date: Tue, 29 Sep 2020 14:28:43 +0000 [thread overview]
Message-ID: <a8a0e23c6d1044b795aa3559542d80ac@AcuMS.aculab.com> (raw)
In-Reply-To: <VI1PR04MB4960404C6A13953B137AD39B92320@VI1PR04MB4960.eurprd04.prod.outlook.com>
From: Sherry Sun
> Sent: 29 September 2020 14:02
>
> Hi Christoph,
>
> > > diff --git a/include/uapi/linux/mic_common.h
> > > b/include/uapi/linux/mic_common.h index 504e523f702c..e680fe27af69
> > > 100644
> > > --- a/include/uapi/linux/mic_common.h
> > > +++ b/include/uapi/linux/mic_common.h
> > > @@ -56,8 +56,6 @@ struct mic_device_desc {
> > > * @vdev_reset: Set to 1 by guest to indicate virtio device has been reset.
> > > * @guest_ack: Set to 1 by guest to ack a command.
> > > * @host_ack: Set to 1 by host to ack a command.
> > > - * @used_address_updated: Set to 1 by guest when the used address
> > > should be
> > > - * updated.
> > > * @c2h_vdev_db: The doorbell number to be used by guest. Set by host.
> > > * @h2c_vdev_db: The doorbell number to be used by host. Set by guest.
> > > */
> > > @@ -67,7 +65,6 @@ struct mic_device_ctrl {
> > > __u8 vdev_reset;
> > > __u8 guest_ack;
> > > __u8 host_ack;
> > > - __u8 used_address_updated;
> > > __s8 c2h_vdev_db;
> > > __s8 h2c_vdev_db;
> > > } __attribute__ ((aligned(8)));
> >
> > This is an ABI change.
>
> Yes, it is. But I noticed that this structure is only used by the vop driver.
> And until now I haven't seen any user tools use it, including the user tool
> mpssd which is corresponding to the vop driver.
Just rename it as 'must_be_zero'.
I've just looked at the header.
WTF is all the __attribute__ ((aligned(8))); about?
Someone is really trying to make it slow on anything other than x86.
It would have been much better to ensure the structure members
are all 'naturally aligned'.
I'm not sure of the usage of the mic_device_ctrl structure.
But you really don't want to share a structure that has
adjacent bytes written by two different entities.
Even with coherent memory you probably should have
separated the data by cache line.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2020-09-29 14:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 8:44 [PATCH V2 0/4] Change vring space from nomal memory to dma coherent memory Sherry Sun
2020-09-29 8:44 ` [PATCH V2 1/4] misc: vop: change the way of allocating vring Sherry Sun
2020-09-29 10:23 ` Christoph Hellwig
2020-09-29 13:02 ` Sherry Sun
2020-09-29 8:44 ` [PATCH V2 2/4] misc: vop: do not allocate and reassign the used ring Sherry Sun
2020-09-29 10:24 ` Christoph Hellwig
2020-09-29 13:02 ` Sherry Sun
2020-09-29 14:28 ` David Laight [this message]
2020-09-29 8:44 ` [PATCH V2 3/4] misc: vop: simply return the saved dma address instead of virt_to_phys Sherry Sun
2020-09-29 10:26 ` Christoph Hellwig
2020-09-29 13:10 ` Sherry Sun
2020-09-29 18:11 ` Christoph Hellwig
2020-09-30 7:30 ` Sherry Sun
2020-10-05 13:42 ` Christoph Hellwig
2020-09-29 8:44 ` [PATCH V2 4/4] misc: vop: mapping kernel memory to user space as noncached Sherry Sun
2020-09-29 10:28 ` Christoph Hellwig
2020-09-29 13:12 ` Sherry Sun
2020-09-29 15:39 ` David Laight
2020-10-13 2:02 ` Sherry Sun
2020-10-20 1:33 ` Sherry Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8a0e23c6d1044b795aa3559542d80ac@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnd@arndb.de \
--cc=ashutosh.dixit@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=kishon@ti.com \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=sherry.sun@nxp.com \
--cc=sudeep.dutt@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome