On 10/26/20 4:49 PM, Jason Gunthorpe wrote:
On Fri, Oct 23, 2020 at 10:31:51PM -0700, John Hubbard wrote:
On 10/23/20 10:19 PM, John Hubbard wrote:
On 10/23/20 5:19 PM, Jason Gunthorpe wrote:
...
If so, it would still be good to wrap the "acquire" and "release"
parts of this into functions, IMHO. So we'd end up with,
effectively, a lock API anyway.
What it really needs is a smp_load_mb() to match the existing smp_store_mb(),
then this implementation wouldn't look so odd.
No argument there!
It is actually really straightforwad since the write side is under the
exclusive mmap_lock.
Yes, conceptually it is pretty clean. I'm still wishing there were a small API to
encapsulate such things, but given that there isn't one, I'll take another look
later tonight and attempt to spot any problems with the current patch, as-is.
"Unfortunately", I don't yet see any problems... :)
thanks,
--
John Hubbard
NVIDIA