From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: keir@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v3] x86/VPMU: Clear last_vcpu when destroying VPMU
Date: Wed, 17 Dec 2014 12:57:22 -0500 [thread overview]
Message-ID: <5491C402.80201@oracle.com> (raw)
In-Reply-To: <5491BD3D02000078000C40D3@mail.emea.novell.com>
On 12/17/2014 12:28 PM, Jan Beulich wrote:
>>>> Boris Ostrovsky <boris.ostrovsky@oracle.com> 12/17/14 4:10 PM >>>
>> + /* Need to clear last_vcpu in case it points to v */
>> + (void)cmpxchg(last, v, NULL);
>
> In a (later) reply to v2 I had indicated that it doesn't seem safe to so here but
> rely on an IPI in the other path altering that value. Can you explain why you
> think this is safe without changing the others to CPU-atomic accesses too?
So the local access to last_vcpu in vpmu_load() may be still raced on (I
was thinking that access in vpmu_load() would on the same processor as
vpmu_destroy(), which is obviously not the case).
So I will have to go back to IPI (I don't want to use cmpxchg in
vpmu_load()).
-boris
prev parent reply other threads:[~2014-12-17 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 15:35 [PATCH v3] x86/VPMU: Clear last_vcpu when destroying VPMU Boris Ostrovsky
2014-12-17 16:21 ` Konrad Rzeszutek Wilk
2014-12-17 16:53 ` Boris Ostrovsky
2014-12-17 17:16 ` Konrad Rzeszutek Wilk
2014-12-17 17:28 ` Jan Beulich
2014-12-17 17:57 ` Boris Ostrovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5491C402.80201@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.