Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243310

Re: [PATCH] kvm: fix waitqueue_active without memory barrier in virt/kvm/async_pf.c

From Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kvm: fix waitqueue_active without memory barrier in virt/kvm/async_pf.c
Date 2015-10-09 14:30 +0200
Message-ID <qhEYa-21U-23@gated-at.bofh.it> (permalink)
References <qhD61-7Lm-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Paolo Bonzini wrote:
> On 09/10/2015 11:04, Kosuke Tatsukawa wrote:
>> smp_store_mb() called from set_current_state(), which is called from
>> prepare_to_wait() should prevent reordering such as below from
>> happening.  wait_event*() also calls set_current_state() inside.
>
> Ah, I missed that set_current_state has a memory barrier in it.  The
> patch is okay, but please expand the comment to say that this memory
> barrier pairs with prepare_to_wait's set_current_state().

thank you for the comment.  I'll send a new version of the patch with
the modification.
---
Kosuke TATSUKAWA  | 3rd IT Platform Department
                  | IT Platform Division, NEC Corporation
                  | tatsu@ab.jp.nec.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c Kosuke Tatsukawa <tatsu@ab.jp.nec.com> - 2015-10-09 02:40 +0200
  Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c Paolo Bonzini <pbonzini@redhat.com> - 2015-10-09 10:50 +0200
    Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c Peter Zijlstra <peterz@infradead.org> - 2015-10-09 11:00 +0200
      Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c Paolo Bonzini <pbonzini@redhat.com> - 2015-10-09 12:30 +0200
    Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c  Kosuke Tatsukawa <tatsu@ab.jp.nec.com> - 2015-10-09 11:10 +0200
      Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c Paolo Bonzini <pbonzini@redhat.com> - 2015-10-09 12:30 +0200
        Re: [PATCH] kvm: fix waitqueue_active without memory barrier in  virt/kvm/async_pf.c  Kosuke Tatsukawa <tatsu@ab.jp.nec.com> - 2015-10-09 14:30 +0200

csiph-web