public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: zhenwei pi <pizhenwei@bytedance.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	stefanha@redhat.com, jasowang@redhat.com,
	xuanzhuo@linux.alibaba.com,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH v2 1/2] virtio: abstract virtqueue related methods
Date: Wed, 17 May 2023 06:39:43 -0400	[thread overview]
Message-ID: <20230517062401-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <cc9f3aea-b8bc-f312-41bb-3fd68083aa99@bytedance.com>

On Wed, May 17, 2023 at 04:35:55PM +0800, zhenwei pi wrote:
> 
> 
> On 5/17/23 15:46, Christoph Hellwig wrote:
> > On Wed, May 17, 2023 at 03:43:03PM +0800, zhenwei pi wrote:
> > > I have a plan to introduce 'Virtio Over Fabrics'(TCP&RDMA) as Virtio
> > > transport, as mentioned in cover letter of this series:
> > > 3 weeks ago, I posted a proposal 'Virtio Over Fabrics':
> > > https://lists.oasis-open.org/archives/virtio-comment/202304/msg00442.html
> > 
> > Just don't do it.  Please define your own protocols over RDMA or TCP
> > for exactly the operations you need (for many they will already exist)
> > instead of piggyg backing on virtio and making everyone else pay the
> > price.
> > 
> 
> Hi
> 
> 1, `virtqueue_add_inbuf` in current version:
> static inline int virtqueue_add_inbuf(struct virtqueue *vq,
>                                       struct scatterlist *sg,
>                                       unsigned int num,
>                                       void *data,
>                                       gfp_t gfp)
> {
>         if (likely(!vq->abstract))
>                 return vring_virtqueue_add_sgs(vq, &sg, num, 0, 1, data,
> NULL, gfp);
> 
>         return vq->add_sgs(vq, &sg, num, 0, 1, data, NULL, gfp);
> }
> 
> And disassemble 'virtinput_queue_evtbuf':
> static void virtinput_queue_evtbuf(struct virtio_input *vi,
>                                    struct virtio_input_event *evtbuf)
> {
>         struct scatterlist sg[1];
> 
>         sg_init_one(sg, evtbuf, sizeof(*evtbuf));
>         virtqueue_add_inbuf(vi->evt, sg, 1, evtbuf, GFP_ATOMIC);
> }
> 
> I notice that two instructions are newly added for vring like:
>  24d:   80 78 35 00             cmpb   $0x0,0x35(%rax)
>  251:   75 3f                   jne    292
> 
> Is it an expensive price...

Can we somehow only override the kick method?
Then take the ring and send it over ...


> 2, Storage/FS specific remote protocol is quite popular, otherwise I'm not
> familiar with other device protocols. For example, I need a remote crypto
> device to accelerate HTTPS ... With Virtio Over Fabrics, I have a chance to
> attach a virtio-crypto device to do this work.
> 
> -- 
> zhenwei pi


  reply	other threads:[~2023-05-17 10:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  2:54 [PATCH v2 0/2] virtio: abstract virtqueue related methods zhenwei pi
2023-05-17  2:54 ` [PATCH v2 1/2] " zhenwei pi
2023-05-17  6:57   ` kernel test robot
2023-05-17  7:10   ` kernel test robot
2023-05-17  7:39   ` Christoph Hellwig
2023-05-17  7:43     ` zhenwei pi
2023-05-17  7:46       ` Christoph Hellwig
2023-05-17  8:35         ` zhenwei pi
2023-05-17 10:39           ` Michael S. Tsirkin [this message]
2023-05-18  0:47             ` zhenwei pi
2023-05-18 10:09               ` Michael S. Tsirkin
2023-05-18 11:01                 ` zhenwei pi
2023-05-17 17:59   ` kernel test robot
2023-05-17  2:54 ` [PATCH v2 2/2] tools/virtio: implement virtqueue in test zhenwei pi
2023-05-17  3:46 ` [PATCH v2 0/2] virtio: abstract virtqueue related methods Michael S. Tsirkin
2023-05-17  3:51   ` zhenwei pi
2023-05-17  3:57     ` Michael S. Tsirkin
2023-05-17  4:58       ` zhenwei pi
2023-05-17  6:10         ` Michael S. Tsirkin
2023-05-17  6:21           ` zhenwei pi
2023-05-17 10:13             ` Michael S. Tsirkin

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=20230517062401-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pizhenwei@bytedance.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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