From: "Michael S. Tsirkin" <mst@redhat.com>
To: Junbo <junbo4242@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH] Do not name control queue for virtio-net
Date: Thu, 22 Sep 2022 05:16:03 -0400 [thread overview]
Message-ID: <20220922051317-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote:
> hi Michael
>
> in virtio-net.c
> /* Parameters for control virtqueue, if any */
> if (vi->has_cvq) {
> callbacks[total_vqs - 1] = NULL;
> names[total_vqs - 1] = "control";
> }
>
> I think the Author who write the code maybe want to name the control queue to
> 'virtioX-control',
That would be me I suspect ;)
> but it never worked, we can see the name still be
> 'virtioX-config' in /proc/interrupts,
Nope, what you see in /proc/interrupts are the interrupts, not the queue
name.
> for example
> 43: 0 0 0 0 0 0
> 0 0 PCI-MSI-edge virtio0-config
> 44: 64 0 0 0 0 0
> 1845 0 PCI-MSI-edge virtio0-input.0
> 45: 1 0 0 0 0 0
> 0 0 PCI-MSI-edge virtio0-output.0
>
> Because in function vp_request_msix_vectors, it just allocate 'xxxx-config' to
> every virtio devices, even the virtio device do not need it.
Oh yes, we can fix that. The result will be this line disappearing for
devices without a config interrupt. Not for net though, that
generally uses a config interrupt for things like link
state detection.
> in /proc/
> interrupts, we can see that each virtio device's first interrupt always named
> 'virtioX-config'.
>
> So I think it's better to not explicitly give the "control" here, it's
> useless...
it's used for debugging.
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Junbo <junbo4242@gmail.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
virtualization@lists.linux-foundation.org,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
bpf@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Do not name control queue for virtio-net
Date: Thu, 22 Sep 2022 05:16:03 -0400 [thread overview]
Message-ID: <20220922051317-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote:
> hi Michael
>
> in virtio-net.c
> /* Parameters for control virtqueue, if any */
> if (vi->has_cvq) {
> callbacks[total_vqs - 1] = NULL;
> names[total_vqs - 1] = "control";
> }
>
> I think the Author who write the code maybe want to name the control queue to
> 'virtioX-control',
That would be me I suspect ;)
> but it never worked, we can see the name still be
> 'virtioX-config' in /proc/interrupts,
Nope, what you see in /proc/interrupts are the interrupts, not the queue
name.
> for example
> 43: 0 0 0 0 0 0
> 0 0 PCI-MSI-edge virtio0-config
> 44: 64 0 0 0 0 0
> 1845 0 PCI-MSI-edge virtio0-input.0
> 45: 1 0 0 0 0 0
> 0 0 PCI-MSI-edge virtio0-output.0
>
> Because in function vp_request_msix_vectors, it just allocate 'xxxx-config' to
> every virtio devices, even the virtio device do not need it.
Oh yes, we can fix that. The result will be this line disappearing for
devices without a config interrupt. Not for net though, that
generally uses a config interrupt for things like link
state detection.
> in /proc/
> interrupts, we can see that each virtio device's first interrupt always named
> 'virtioX-config'.
>
> So I think it's better to not explicitly give the "control" here, it's
> useless...
it's used for debugging.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-09-22 9:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 9:28 [PATCH] Do not name control queue for virtio-net junbo4242
2022-09-18 6:56 ` Michael S. Tsirkin
2022-09-18 6:56 ` Michael S. Tsirkin
[not found] ` <CACvn-oGUj0mDxBO2yV1mwvz4PzhN3rDnVpUh12NA5jLKTqRT3A@mail.gmail.com>
2022-09-18 12:17 ` Michael S. Tsirkin
2022-09-18 12:17 ` Michael S. Tsirkin
2022-09-22 9:10 ` Paolo Abeni
2022-09-22 9:10 ` Paolo Abeni
2022-09-22 9:17 ` Michael S. Tsirkin
2022-09-22 9:17 ` Michael S. Tsirkin
2022-09-22 9:16 ` Michael S. Tsirkin [this message]
2022-09-22 9:16 ` 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=20220922051317-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=junbo4242@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.