在 2024/3/22 下午1:19, Jason Wang 写道:
On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
Currently, ctrlq processes commands in a synchronous manner,
which increases the delay of dim commands when configuring
multi-queue VMs, which in turn causes the CPU utilization to
increase and interferes with
在 2024/3/22 下午1:17, Jason Wang 写道:
On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
When the dim worker is scheduled, if it fails to acquire the lock,
dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim worker of rxq0 is sc
在 2024/3/21 下午8:25, Jiri Pirko 写道:
Thu, Mar 21, 2024 at 12:45:55PM CET, hen...@linux.alibaba.com wrote:
Patch 1 fixes an existing bug. Belongs to the net branch.
Send separately with "net" indication in the patch brackets:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html?h
On Fri, Mar 22, 2024 at 2:04 PM Xuan Zhuo wrote:
>
> On Fri, 22 Mar 2024 13:13:36 +0800, Jason Wang wrote:
> > On Thu, Mar 21, 2024 at 4:22 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 21 Mar 2024 14:02:14 +0800, Jason Wang
> > > wrote:
> > > > On Tue, Mar 12, 2024 at 11:36 AM Xuan Zhuo
> >
在 2024/3/25 下午2:29, Jason Wang 写道:
On Mon, Mar 25, 2024 at 10:11 AM Heng Qi wrote:
在 2024/3/22 下午1:17, Jason Wang 写道:
On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
When the dim worker is scheduled, if it fails to acquire the lock,
dim may not be able to return to the working state late
On Mon, Mar 25, 2024 at 2:58 PM Heng Qi wrote:
>
>
>
> 在 2024/3/25 下午2:29, Jason Wang 写道:
> > On Mon, Mar 25, 2024 at 10:11 AM Heng Qi wrote:
> >>
> >>
> >> 在 2024/3/22 下午1:17, Jason Wang 写道:
> >>> On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
> When the dim worker is scheduled, if it fail
On Fri, Mar 22, 2024 at 3:58 PM Xuan Zhuo wrote:
>
> On Fri, 22 Mar 2024 13:15:10 +0800, Jason Wang wrote:
> > On Thu, Mar 21, 2024 at 4:29 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 21 Mar 2024 12:47:18 +0800, Jason Wang
> > > wrote:
> > > > On Tue, Mar 12, 2024 at 11:36 AM Xuan Zhuo
> >
在 2024/3/25 下午1:57, Jason Wang 写道:
On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
在 2024/3/22 下午1:19, Jason Wang 写道:
On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
Currently, ctrlq processes commands in a synchronous manner,
which increases the delay of dim commands when configuring
mu
Hello,
On Fri, Mar 22, 2024 at 12:19 PM Igor Raits wrote:
>
> Hi Jason,
>
> On Fri, Mar 22, 2024 at 9:39 AM Igor Raits wrote:
> >
> > Hi Jason,
> >
> > On Fri, Mar 22, 2024 at 6:31 AM Jason Wang wrote:
> > >
> > > On Thu, Mar 21, 2024 at 5:44 PM Igor Raits wrote:
> > > >
> > > > Hello Jason &
To make the code readable, introduce vring_need_unmap_buffer() to
replace do_unmap.
use_dma_api premapped -> vring_need_unmap_buffer()
1. false falsefalse
2. truefalsetrue
3. truetrue false
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drive
This commit structure the indirect desc table.
Then we can get the desc num directly when doing unmap.
And save the dma info to the struct, then the indirect
will not use the dma fields of the desc_extra. The subsequent
commits will make the dma fields are optional. But for
the indirect case, we m
As discussed:
http://lore.kernel.org/all/cacgkmevq0no8qgc46u4mgsmtud44fd_cflcpavmj3rhyqrz...@mail.gmail.com
If the virtio is premapped mode, the driver should manage the dma info by self.
So the virtio core should not store the dma info. We can release the memory used
to store the dma info.
For
This commit structure the indirect desc table.
Then we can get the desc num directly when doing unmap.
And save the dma info to the struct, then the indirect
will not use the dma fields of the desc_extra. The subsequent
commits will make the dma fields are optional. But for
the indirect case, we m
If the premapped mode is enabled, the dma array(struct vring_desc_dma) of
virtio core will not be allocated. That is judged when find_vqs() is
called. To avoid allocating dma array in find_vqs() and releasing it
immediately by virtqueue_set_dma_premapped(). This patch introduces a
new parameter to
In the functions vring_unmap_one_split and
vring_unmap_one_split_indirect,
multiple checks are made whether unmap is performed and whether it is
INDIRECT.
These two functions are usually called in a loop, and we should put the
check outside the loop.
And we unmap the descs with VRING_DESC_F_INDIR
Export the premapped to drivers, then drivers can check
the vq premapped mode after the find_vqs().
Because the find_vqs() just try to enable the vq premapped mode,
the driver must check that after find_vqs().
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 13 +
include/
On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
>
>
>
> 在 2024/3/25 下午1:57, Jason Wang 写道:
> > On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
> >>
> >>
> >> 在 2024/3/22 下午1:19, Jason Wang 写道:
> >>> On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
> Currently, ctrlq processes commands in a syn
On Mon, Mar 25, 2024 at 4:22 PM Heng Qi wrote:
>
>
>
> 在 2024/3/25 下午3:56, Jason Wang 写道:
> > On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
> >>
> >>
> >> 在 2024/3/25 下午1:57, Jason Wang 写道:
> >>> On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
>
> 在 2024/3/22 下午1:19, Jason Wang 写道:
>
在 2024/3/25 下午3:56, Jason Wang 写道:
On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
在 2024/3/25 下午1:57, Jason Wang 写道:
On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
在 2024/3/22 下午1:19, Jason Wang 写道:
On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
Currently, ctrlq processes commands
On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
>
>
>
> 在 2024/3/22 下午1:19, Jason Wang 写道:
> > On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
> >> Currently, ctrlq processes commands in a synchronous manner,
> >> which increases the delay of dim commands when configuring
> >> multi-queue VMs, whi
As discussed:
http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSgUKMC==04m7-uem_yc21bggkkzh8...@mail.gmail.com
When the vq is premapped mode, the driver manages the dma
info is a good way.
So this commit make the virtio core not to store the dma
info and release the memory which is used to store the
Now, the API virtqueue_set_dma_premapped just support to
enable premapped mode.
If we allow enabling the premapped dynamically, we should
make this API to support disable the premapped mode.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 39 +++-
inc
In the functions vring_unmap_extra_packed and vring_unmap_desc_packed,
multiple checks are made whether unmap is performed and whether it is
INDIRECT.
These two functions are usually called in a loop, and we should put the
check outside the loop.
And we unmap the descs with VRING_DESC_F_INDIRECT
On Mon, Mar 25, 2024 at 10:11 AM Heng Qi wrote:
>
>
>
> 在 2024/3/22 下午1:17, Jason Wang 写道:
> > On Thu, Mar 21, 2024 at 7:46 PM Heng Qi wrote:
> >> When the dim worker is scheduled, if it fails to acquire the lock,
> >> dim may not be able to return to the working state later.
> >>
> >> For exampl
Now, the virtio core can set the premapped mode by find_vqs().
If the premapped can be enabled, the dma array will not be
allocated. So virtio-net use the api of find_vqs to enable the
premapped.
Judge the premapped mode by the vq->premapped instead of saving
local variable.
Signed-off-by: Xuan Z
Currently the buffer used for control VQ commands is protected by the
RTNL lock. Previously this wasn't a major concern because the control
VQ was only used during device setup and user interaction. With the
recent addition of dynamic interrupt moderation the control VQ may be
used frequently durin
Stop storing RSS setting in the control buffer. This is prep work for
removing RTNL lock protection of the control buffer.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 40
1 file changed, 20 insertions(+), 20 delet
Allocate memory for the data when it's used. Ideally the could be on the
stack, but we can't DMA stack memory. With this change only the header
and status memory are shared between commands, which will allow using a
tighter lock than RTNL.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
--
The command VQ will no longer be protected by the RTNL lock. Use a
spinlock to protect the control buffer header and the VQ.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vi
The rtnl lock is no longer needed to protect the control buffer and
command VQ.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 27 +--
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/
For series:
Reviewed-by: Xuan Zhuo
On Mon, 25 Mar 2024 16:49:07 -0500, Daniel Jurgens wrote:
> Currently the buffer used for control VQ commands is protected by the
> RTNL lock. Previously this wasn't a major concern because the control
> VQ was only used during device setup and user interactio
在 2024/3/25 下午4:42, Jason Wang 写道:
On Mon, Mar 25, 2024 at 4:22 PM Heng Qi wrote:
在 2024/3/25 下午3:56, Jason Wang 写道:
On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
在 2024/3/25 下午1:57, Jason Wang 写道:
On Mon, Mar 25, 2024 at 10:21 AM Heng Qi wrote:
在 2024/3/22 下午1:19, Jason Wang 写道:
在 2024/3/26 上午5:49, Daniel Jurgens 写道:
Currently the buffer used for control VQ commands is protected by the
RTNL lock. Previously this wasn't a major concern because the control
VQ was only used during device setup and user interaction. With the
recent addition of dynamic interrupt moderation
On Tue, Mar 26, 2024 at 10:46 AM Heng Qi wrote:
>
>
>
> 在 2024/3/25 下午4:42, Jason Wang 写道:
> > On Mon, Mar 25, 2024 at 4:22 PM Heng Qi wrote:
> >>
> >>
> >> 在 2024/3/25 下午3:56, Jason Wang 写道:
> >>> On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
>
> 在 2024/3/25 下午1:57, Jason Wang 写道:
>
> From: Heng Qi
> Sent: Monday, March 25, 2024 9:54 PM
> To: Dan Jurgens ; netdev@vger.kernel.org
> Cc: m...@redhat.com; jasow...@redhat.com; xuanz...@linux.alibaba.com;
> virtualizat...@lists.linux.dev; da...@davemloft.net;
> eduma...@google.com; k...@kernel.org; pab...@redhat.com; Jiri Pirko
>
On Mon, Mar 25, 2024 at 4:44 PM Igor Raits wrote:
>
> Hello,
>
> On Fri, Mar 22, 2024 at 12:19 PM Igor Raits wrote:
> >
> > Hi Jason,
> >
> > On Fri, Mar 22, 2024 at 9:39 AM Igor Raits wrote:
> > >
> > > Hi Jason,
> > >
> > > On Fri, Mar 22, 2024 at 6:31 AM Jason Wang wrote:
> > > >
> > > > On
在 2024/3/26 下午12:08, Jason Wang 写道:
On Tue, Mar 26, 2024 at 10:46 AM Heng Qi wrote:
在 2024/3/25 下午4:42, Jason Wang 写道:
On Mon, Mar 25, 2024 at 4:22 PM Heng Qi wrote:
在 2024/3/25 下午3:56, Jason Wang 写道:
On Mon, Mar 25, 2024 at 3:18 PM Heng Qi wrote:
在 2024/3/25 下午1:57, Jason Wang 写道:
On Tue, Mar 26, 2024 at 1:57 PM Heng Qi wrote:
>
>
>
> 在 2024/3/26 下午12:08, Jason Wang 写道:
> > On Tue, Mar 26, 2024 at 10:46 AM Heng Qi wrote:
> >>
> >>
> >> 在 2024/3/25 下午4:42, Jason Wang 写道:
> >>> On Mon, Mar 25, 2024 at 4:22 PM Heng Qi wrote:
>
> 在 2024/3/25 下午3:56, Jason Wang 写道:
>
在 2024/3/26 下午12:11, Dan Jurgens 写道:
From: Heng Qi
Sent: Monday, March 25, 2024 9:54 PM
To: Dan Jurgens ; netdev@vger.kernel.org
Cc: m...@redhat.com; jasow...@redhat.com; xuanz...@linux.alibaba.com;
virtualizat...@lists.linux.dev; da...@davemloft.net;
eduma...@google.com; k...@kernel.org; pab
When the dim worker is scheduled, if it fails to acquire the lock,
dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim worker of rxq0 is scheduled, and the dim status is
changed to DIM_APPLY_NEW_PROFILE;
2. The ethtool com
On Mon, Mar 25, 2024 at 4:54 PM Xuan Zhuo wrote:
>
> As discussed:
>
> http://lore.kernel.org/all/cacgkmevq0no8qgc46u4mgsmtud44fd_cflcpavmj3rhyqrz...@mail.gmail.com
>
> If the virtio is premapped mode, the driver should manage the dma info by
> self.
> So the virtio core should not store the dma
41 matches
Mail list logo