All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Cc: wei.liu2@citrix.com, george.dunlap@eu.citrix.com,
	ian.jackson@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org,
	paul.durrant@citrix.com, david.vrabel@citrix.com, keir@xen.org
Subject: Re: [for-4.7] x86/emulate: synchronize LOCKed instruction emulation
Date: Tue, 26 Apr 2016 18:39:26 +0100	[thread overview]
Message-ID: <571FA7CE.7010601@citrix.com> (raw)
In-Reply-To: <49cfacf8-2ad2-1f73-07cd-3847c6d3ae7a@bitdefender.com>

On 26/04/16 18:23, Razvan Cojocaru wrote:
> On 04/26/16 19:03, George Dunlap wrote:
>> On 19/04/16 17:35, Jan Beulich wrote:
>>>>>> Razvan Cojocaru <rcojocaru@bitdefender.com> 04/19/16 1:01 PM >>>
>>>> I think this might be because the LOCK prefix should guarantee that the
>>>> instruction that follows it has exclusive use of shared memory (for both
>>>> reads and writes) but I might be misreading the docs:
>>> LOCK definitely has no effect on other than the instruction it gets applied
>>> to.
>> Sorry I wasn't involved in this discussion -- what was the conclusion here?
>>
>> FWIW Andy's suggestion of using a stub seemed like the most robust
>> solution, if that could be made to work.
>>
>> If you're going to submit a patch substantially similar to this one, let
>> me know so I can review the mm bits of the original patch.
> I'm not really sure.
>
> Regarding this version of the patch, Jan has asked for more information
> on the performance impact, but I'm not sure how to obtain it in a
> rigorous manner. If it is decided that a version of this patch is
> desirable, I can go on fixing the issues we've found and address the
> comments we've had so far and submit a new version.

XenServer did performance testing.  No observable impact for normal VM
workloads (which is to be expected, as an OS wouldn't normally LOCK the
instructions it uses for MMIO).  The per-cpu rwlocks have ~0 overhead
when the lock isn't held for writing.

>
> I'm not familiar with what the stub solution would imply, so I'm afraid
> I can't comment on that. This is not code I've had that much contact
> with prior to stumbling into this problem.

As for the fix I suggested, its probably prohibitive to fix the current
emulator, given the plans for a rewrite.  (And on that note, I really
need to write a design doc and post to the list).

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-26 17:39 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 12:26 [for-4.7] x86/emulate: synchronize LOCKed instruction emulation Razvan Cojocaru
2016-04-14  4:35 ` Jan Beulich
2016-04-14  5:56   ` Razvan Cojocaru
2016-04-14  6:09     ` Juergen Gross
2016-04-14  6:31       ` Razvan Cojocaru
2016-04-14  7:46         ` Juergen Gross
2016-04-14  8:01           ` Andrew Cooper
2016-04-14  8:18             ` Juergen Gross
2016-04-14  8:25               ` Razvan Cojocaru
2016-04-14  8:07     ` Andrew Cooper
2016-04-14  8:09       ` Razvan Cojocaru
2016-04-14  9:08     ` Razvan Cojocaru
2016-04-14 15:33       ` Jan Beulich
2016-04-14 15:44     ` Jan Beulich
2016-04-14 16:00       ` Razvan Cojocaru
2016-04-14 16:11         ` Jan Beulich
2016-04-14  8:51   ` Razvan Cojocaru
2016-04-14 15:31     ` Jan Beulich
2016-04-14 15:40       ` Razvan Cojocaru
2016-04-14 10:35 ` David Vrabel
2016-04-14 11:43   ` Razvan Cojocaru
2016-04-14 15:40     ` Jan Beulich
2016-04-14 15:45       ` Razvan Cojocaru
2016-04-14 16:08         ` Jan Beulich
2016-04-18 12:14           ` Razvan Cojocaru
2016-04-18 16:45             ` Jan Beulich
2016-04-19 11:01               ` Razvan Cojocaru
2016-04-19 16:35                 ` Jan Beulich
2016-04-26 16:03                   ` George Dunlap
2016-04-26 17:23                     ` Razvan Cojocaru
2016-04-26 17:39                       ` Andrew Cooper [this message]
2016-04-27  6:25                         ` Jan Beulich
2016-04-27  7:36                           ` Andrew Cooper
2016-04-27  6:22                       ` Jan Beulich
2016-04-27  7:14                         ` Razvan Cojocaru
2016-05-03 14:20                           ` Razvan Cojocaru
2016-05-03 14:30                             ` Jan Beulich
2016-05-03 14:41                               ` Razvan Cojocaru
2016-05-03 15:13                                 ` Jan Beulich
2016-05-04 11:32                                   ` Razvan Cojocaru
2016-05-04 13:42                                     ` Jan Beulich
2016-05-05  9:25                                       ` Razvan Cojocaru
2016-05-05 16:38                                         ` Jan Beulich
2016-04-14 15:45       ` Andrew Cooper
2016-04-14 16:09         ` Jan Beulich
2016-05-13 15:27 ` Wei Liu
2016-05-13 15:51   ` Jan Beulich

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=571FA7CE.7010601@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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.