Displaying 4 results from an estimated 4 matches for "dependent_ptr_rmb".
Did you mean:
dependent_ptr_mb
2019 Jan 07
2
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...\
> + OPTIMIZER_HIDE_VAR(dependent_ptr_mb_val); \
> + (typeof(ptr))(dependent_ptr_mb_ptr + dependent_ptr_mb_val); \
> +})
> +
> +#else
> +
> +#define dependent_ptr_mb(ptr, val) ({ mb(); (ptr); })
So for the example of patch 4, we'd better fall back to rmb() or need a
dependent_ptr_rmb()?
Thanks
> +
> +#endif
> +
> #ifdef CONFIG_SMP
>
> #ifndef smp_mb
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index 6601d39e8c48..f599c30f1b28 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -152,9 +1...
2019 Jan 07
2
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...\
> + OPTIMIZER_HIDE_VAR(dependent_ptr_mb_val); \
> + (typeof(ptr))(dependent_ptr_mb_ptr + dependent_ptr_mb_val); \
> +})
> +
> +#else
> +
> +#define dependent_ptr_mb(ptr, val) ({ mb(); (ptr); })
So for the example of patch 4, we'd better fall back to rmb() or need a
dependent_ptr_rmb()?
Thanks
> +
> +#endif
> +
> #ifdef CONFIG_SMP
>
> #ifndef smp_mb
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index 6601d39e8c48..f599c30f1b28 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -152,9 +1...
2019 Jan 07
0
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...l); \
> > + (typeof(ptr))(dependent_ptr_mb_ptr + dependent_ptr_mb_val); \
> > +})
> > +
> > +#else
> > +
> > +#define dependent_ptr_mb(ptr, val) ({ mb(); (ptr); })
>
>
> So for the example of patch 4, we'd better fall back to rmb() or need a
> dependent_ptr_rmb()?
>
> Thanks
You mean for strongly ordered architectures like Intel?
Yes, maybe it makes sense to have dependent_ptr_smp_rmb,
dependent_ptr_dma_rmb and dependent_ptr_virt_rmb.
mb variant is unused right now so I'll remove it.
>
> > +
> > +#endif
> > +
> >...
2019 Jan 02
6
[PATCH RFC 0/4] barriers using data dependency
So as explained in Documentation/memory-barriers.txt e.g.
a load followed by a store require a full memory barrier,
to avoid store being ordered before the load.
Similarly load-load requires a read memory barrier.
Thinking about it, we can actually create a data dependency
by mixing the first loaded value into the pointer being
accessed.
This adds an API for this and uses it in virtio.
Written