[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251117054850-mutt-send-email-mst@kernel.org>
Date: Mon, 17 Nov 2025 05:50:19 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Eugenio Perez Martin <eperezma@...hat.com>
Cc: Jason Wang <jasowang@...hat.com>, Laurent Vivier <lvivier@...hat.com>,
virtualization@...ts.linux.dev,
Maxime Coquelin <mcoqueli@...hat.com>, Cindy Lu <lulu@...hat.com>,
linux-kernel@...r.kernel.org, Yongji Xie <xieyongji@...edance.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Stefano Garzarella <sgarzare@...hat.com>
Subject: Re: [PATCH v9 5/6] vduse: add vq group asid support
On Fri, Nov 14, 2025 at 12:25:03PM +0100, Eugenio Perez Martin wrote:
> RCU is protecting that the address space pointer of the vq group is
> not modified concurrently with the access. Ideally, this should be a
> full lock, but just making sure that all accesses from the reader are
> coherent is enough. Userspace should expect nothing if it uses the map
> and modifies the vq group ASID at the same time anyway, but the kernel
> needs to be sure that it does not see intermediate states. TBH, we
> could move to a READ_ONCE / WRITE_ONCE, would that be more clear?
generally rcu itself does not need ONCE macros.
these are for funky lockless things, and rcu can be
seen as a kind of lock, after all.
--
MST
Powered by blists - more mailing lists