> I meant mutex doesn't prevent the preemption so the process could be
> migrated to another cpu.
Ok, I see it now, thanks.
I'll add a spinlock in v3.
Thanks.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxf
在 2023/4/10 15:09, Alvaro Karsz 写道:
In this case, I can just remove the wmb and that's it, right?
But who or how to prevent the preemption?
We use a mutex to protect the control mechanism (snet->ctrl_lock).
I meant mutex doesn't prevent the preemption so the process could be
migrated to an
> > In this case, I can just remove the wmb and that's it, right?
>
> But who or how to prevent the preemption?
We use a mutex to protect the control mechanism (snet->ctrl_lock).
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
On Tue, Apr 4, 2023 at 3:35 PM Alvaro Karsz wrote:
>
> > > So it will arrive to the pci subsystem in program order, but the pci
> > > subsystem may reorder, right?
> >
> > This is not what I read from the above doc. It said "to a particular
> > device will arrive in program order".
>
> In this ca
> > So it will arrive to the pci subsystem in program order, but the pci
> > subsystem may reorder, right?
>
> This is not what I read from the above doc. It said "to a particular
> device will arrive in program order".
In this case, I can just remove the wmb and that's it, right?
Thanks
__
On Mon, Apr 3, 2023 at 5:18 PM Alvaro Karsz wrote:
>
> Hi Jason,
>
> > > + /* Overwrite the control register with the new buffer size (in 4B
> > > words) */
> > > + snet_write_ctrl(regs, buf_words);
> > > + /* Use a memory barrier, this must be written before the opcode
> > > r
> I'm not sure how a spinlock can help in this case.
> The entire control mechanism is protected by the spinlock snet->ctrl_lock, so
> multiple CPUs won't use it simultaneously.
Sorry, snet->ctrl_lock is a mutex, not a spinlock.
___
Virtualization maili
Hi Jason,
> > + /* Overwrite the control register with the new buffer size (in 4B
> > words) */
> > + snet_write_ctrl(regs, buf_words);
> > + /* Use a memory barrier, this must be written before the opcode
> > register. */
> > + wmb();
>
>
> At least you need to use smp
On Sun, Apr 2, 2023 at 8:52 PM Alvaro Karsz wrote:
>
> This patch adds the get_vq_state and set_vq_state vDPA callbacks.
>
> In order to get the VQ state, the state needs to be read from the DPU.
> In order to allow that, the old messaging mechanism is replaced with a new,
> flexible control mecha
This patch adds the get_vq_state and set_vq_state vDPA callbacks.
In order to get the VQ state, the state needs to be read from the DPU.
In order to allow that, the old messaging mechanism is replaced with a new,
flexible control mechanism.
This mechanism allows to read data from the DPU.
The mec
10 matches
Mail list logo