Displaying 9 results from an estimated 9 matches for "dependent_ptr_mb".
2019 Jan 07
2
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...> specific order. At the moment one has to use a memory barrier for this.
>
> However, if the first access was a read and the second used an address
> depending on the first one we would have a data dependency and no
> barrier would be necessary.
>
> This adds a new interface: dependent_ptr_mb which does exactly this: it
> returns a pointer with a data dependency on the supplied value.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
> arch/alpha/include/asm/barrier.h | 1 +
> i...
2019 Jan 07
2
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...> specific order. At the moment one has to use a memory barrier for this.
>
> However, if the first access was a read and the second used an address
> depending on the first one we would have a data dependency and no
> barrier would be necessary.
>
> This adds a new interface: dependent_ptr_mb which does exactly this: it
> returns a pointer with a data dependency on the supplied value.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
> arch/alpha/include/asm/barrier.h | 1 +
> i...
2019 Jan 02
6
[PATCH RFC 0/4] barriers using data dependency
...atchset is also suboptimal on e.g. x86 where e.g. smp_rmb is a nop.
Sending out for early feedback/flames.
Michael S. Tsirkin (4):
include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR
include/linux/compiler.h: allow memory operands
barriers: convert a control to a data dependency
virtio: use dependent_ptr_mb
Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
arch/alpha/include/asm/barrier.h | 1 +
drivers/virtio/virtio_ring.c | 6 ++++--
include/asm-generic/barrier.h | 18 ++++++++++++++++++
include/linux/compiler-clang.h | 5 ++---
include/linux/compiler-gcc.h | 4 ---...
2019 Jan 02
0
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...unrelated memory locations in a
specific order. At the moment one has to use a memory barrier for this.
However, if the first access was a read and the second used an address
depending on the first one we would have a data dependency and no
barrier would be necessary.
This adds a new interface: dependent_ptr_mb which does exactly this: it
returns a pointer with a data dependency on the supplied value.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
arch/alpha/include/asm/barrier.h | 1 +
include/asm-generic/barrier.h | 18...
2019 Jan 07
0
[PATCH RFC 3/4] barriers: convert a control to a data dependency
...ent one has to use a memory barrier for this.
> >
> > However, if the first access was a read and the second used an address
> > depending on the first one we would have a data dependency and no
> > barrier would be necessary.
> >
> > This adds a new interface: dependent_ptr_mb which does exactly this: it
> > returns a pointer with a data dependency on the supplied value.
> >
> > Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> > ---
> > Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
> > arch/alpha/include...
2019 Jan 02
0
[PATCH RFC 0/4] barriers using data dependency
...gt; > Sending out for early feedback/flames.
> >
> > Michael S. Tsirkin (4):
> > include/linux/compiler*.h: fix OPTIMIZER_HIDE_VAR
> > include/linux/compiler.h: allow memory operands
> > barriers: convert a control to a data dependency
> > virtio: use dependent_ptr_mb
> >
> > Documentation/memory-barriers.txt | 20 ++++++++++++++++++++
> > arch/alpha/include/asm/barrier.h | 1 +
> > drivers/virtio/virtio_ring.c | 6 ++++--
> > include/asm-generic/barrier.h | 18 ++++++++++++++++++
> > include/linux/compiler-clang...
2019 Aug 03
1
[PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker
...ks
> to me smp_wmb() is in write_segcount_begin() is sufficient, we don't
> care vq->map read before smp_wmb(), and for the other we all have
> good data devendency so smp_wmb() in the write_seqbegin_end() is
> sufficient.
If we need an mb in the begin() we can switch to
dependent_ptr_mb. if you need me to fix it up
and repost, let me know.
Why isn't it a problem if the map is
accessed outside the lock?
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index db2c81cb1e90..6d9501303258 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost....
2019 Jul 31
2
[PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker
On Wed, Jul 31, 2019 at 04:46:53AM -0400, Jason Wang wrote:
> We used to use RCU to synchronize MMU notifier with worker. This leads
> calling synchronize_rcu() in invalidate_range_start(). But on a busy
> system, there would be many factors that may slow down the
> synchronize_rcu() which makes it unsuitable to be called in MMU
> notifier.
>
> A solution is SRCU but its
2019 Jul 31
2
[PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker
On Wed, Jul 31, 2019 at 04:46:53AM -0400, Jason Wang wrote:
> We used to use RCU to synchronize MMU notifier with worker. This leads
> calling synchronize_rcu() in invalidate_range_start(). But on a busy
> system, there would be many factors that may slow down the
> synchronize_rcu() which makes it unsuitable to be called in MMU
> notifier.
>
> A solution is SRCU but its