From: zhenwei pi <pizhenwei@bytedance.com>
To: "Michael S. Tsirkin" <mst@redhat.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: Re: Re: [PATCH v2 1/2] virtio: abstract virtqueue related methods
Date: Thu, 18 May 2023 19:01:40 +0800 [thread overview]
Message-ID: <f16b8f56-8890-a4ae-0108-ff5667350fbc@bytedance.com> (raw)
In-Reply-To: <20230518060656-mutt-send-email-mst@kernel.org>
On 5/18/23 18:09, Michael S. Tsirkin wrote:
> On Thu, May 18, 2023 at 08:47:22AM +0800, zhenwei pi wrote:
>> On 5/17/23 18:39, Michael S. Tsirkin wrote:
>>> 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 ...
>>>
>>
>> Could you please take a look at this code?
>> https://github.com/pizhenwei/linux/blob/virtio-of-github/drivers/virtio/virtio_fabrics.c#LL861C13-L861C23
>
> what am I looking at here?
>
> Looks like at least vof_handle_vq duplicates some code from vringh.
> But besides that yes, that's the idea.
>
OK, I'd drop this series.
Cc Jason & Stefan.
--
zhenwei pi
next prev parent reply other threads:[~2023-05-18 11:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 2:54 [PATCH v2 0/2] " 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
2023-05-18 0:47 ` zhenwei pi
2023-05-18 10:09 ` Michael S. Tsirkin
2023-05-18 11:01 ` zhenwei pi [this message]
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=f16b8f56-8890-a4ae-0108-ff5667350fbc@bytedance.com \
--to=pizhenwei@bytedance.com \
--cc=hch@infradead.org \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.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
all inboxes | Powered by JetHome®