xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dagaen Golomb <dgolomb@seas.upenn.edu>
Cc: Juergen Gross <jgross@suse.com>, Xen-devel@lists.xen.org
Subject: Re: Elaboration of "Question about sharing spinlock_t among VMs in Xen"
Date: Mon, 27 Jun 2016 15:09:24 -0400	[thread overview]
Message-ID: <20160627190924.GB21942@char.us.oracle.com> (raw)
In-Reply-To: <CALcuvTghLzyE13by5ZEoSPWEERVZKt=zdPp45-Rc_v9g5oRi5Q@mail.gmail.com>

> > One other thing you should be aware of: as soon as one of your guests
> > has only one vcpu it will drop the "lock" prefixes for updates of the
> > lock word. So there will be a chance of races just because one or both
> > guests are thinking no other cpu can access the lock word concurrently.
> 
> Now that is an interesting point! I am indeed using 1 vcpu for each
> domain right now. Does it automatically drop lock if it detects one
> vcpu when booting? Or is this set at compile time? Shouldn't setting

It does patching of the binary during bootup time.

You can disable the patching by using noreplace-smp on Linux command line.


> SMP to y regardless of core/vcpu count keep the SMP spinlock
> implementation? I definitely did not think about this -- It was
> compiled with one vcpu so if its done at compile time this could be
> the issue. I doubt its done at boot but if so I would presume there is
> a way to disable this?
> 
> Below is the config file grepped for "SMP".
> CONFIG_X86_64_SMP=y
> CONFIG_GENERIC_SMP_IDLE_THREAD=y
> CONFIG_SMP=y
> # CONFIG_X86_VSMP is not set
> # CONFIG_MAXSMP is not set
> CONFIG_PM_SLEEP_SMP=y
> 
> See anything problematic? Seems PV spinlocks is not set, and SMP is
> enabled... or is something else required to prevent stripping the
> spinlocks? Also not sure if any of the set SPIN config items could
> mess with this. If this is done at boot, a point in the direction for
> preventing this would be appreciated!
> 
> Regards,
> Dagaen Golomb
> Ph.D Student, University of Pennsylvania

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

  reply	other threads:[~2016-06-27 19:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  2:44 Elaboration of "Question about sharing spinlock_t among VMs in Xen" Dagaen Golomb
2016-06-27 14:08 ` Konrad Rzeszutek Wilk
2016-06-27 15:24   ` Dagaen Golomb
2016-06-27 18:22     ` Juergen Gross
2016-06-27 18:40       ` Dagaen Golomb
2016-06-27 19:09         ` Konrad Rzeszutek Wilk [this message]
2016-06-27 19:12           ` Dagaen Golomb
2016-06-27 19:59             ` Dagaen Golomb

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=20160627190924.GB21942@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=Xen-devel@lists.xen.org \
    --cc=dgolomb@seas.upenn.edu \
    --cc=jgross@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).