xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Bader <stefan.bader@canonical.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Xen PVM: Strange lockups when running PostgreSQL load
Date: Fri, 19 Oct 2012 10:33:11 +0200	[thread overview]
Message-ID: <50811047.4080200@canonical.com> (raw)
In-Reply-To: <5081264002000078000A2841@nat28.tlf.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 1930 bytes --]

On 19.10.2012 10:06, Jan Beulich wrote:
>>>> On 18.10.12 at 22:52, Stefan Bader <stefan.bader@canonical.com> wrote:
>> Actually I begin to suspect that it could be possible that I just overlooked 
>> the
>> most obvious thing. Provoking question: are we sure we are on the same page
>> about the purpose of the spin_lock_flags variant of the pv lock ops 
>> interface?
>>
>> I begin to suspect that it really is not for giving a chance to re-enable
>> interrupts. Just what it should be used for I am not clear. Anyway it seems 
>> all
>> other places more or less ignore the flags and map themselves back to an
>> ignorant version of spinlock.
>> Also I believe that the only high level function that would end up in 
>> passing
>> any flags, would be the spin_lock_irqsave one. And I am pretty sure that 
>> this
>> one will expect interrupts to stay disabled.
> 
> No - the only requirement here is that from the point on where
> the lock is owned interrupt must remain disabled. Re-enabling
> intermediately is quite okay (and used to be done by the
> native kernel prior to the conversion to ticket locks iirc).

Though it seems rather dangerous then. Don't remember the old code, but imo it
always opens up a (even microscopic) window to unexpected interruptions.

> 
>> So I tried below approach and that seems to be surviving the previously 
>> breaking
>> testcase for much longer than anything I tried before.
> 
> If that indeed fixes your problem, then (minus eventual problems
> with the scope of the interrupts-enabled window) this rather
> points at a bug in the users of the spinlock interfaces.

I would be pragmatic here, none of the other current implementations seem to
re-enable interrupts and so this only affects xen pv. And how much really is
gained from enabling it compared to the risk of being affected by something that
nobody else will be?

> 
> Jan
> 



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2012-10-19  8:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 13:10 Xen PVM: Strange lockups when running PostgreSQL load Stefan Bader
2012-10-17 13:28 ` Andrew Cooper
2012-10-17 13:45   ` Stefan Bader
2012-10-17 13:55   ` Ian Campbell
2012-10-17 15:21     ` Stefan Bader
2012-10-17 15:35       ` Andrew Cooper
2012-10-17 16:27         ` Stefan Bader
2012-10-17 17:46           ` Andrew Cooper
2012-10-18  7:00         ` Jan Beulich
2012-10-18  7:08           ` Jan Beulich
2012-10-18  7:38             ` Stefan Bader
2012-10-18  7:48               ` Ian Campbell
2012-10-18 10:20                 ` Stefan Bader
2012-10-18 10:47                   ` Jan Beulich
2012-10-18 12:43                     ` Stefan Bader
2012-10-18 20:52                       ` Stefan Bader
2012-10-19  7:10                         ` Stefan Bader
2012-10-19  8:06                         ` Jan Beulich
2012-10-19  8:33                           ` Stefan Bader [this message]
2012-10-19  9:24                             ` Jan Beulich
2012-10-19 14:03                               ` Stefan Bader
2012-10-19 14:49                                 ` Jan Beulich
2012-10-19 14:57                                   ` Stefan Bader
2012-10-19 15:08                                     ` Jan Beulich
2012-10-19 15:21                                       ` Stefan Bader
2012-10-19 15:33                                         ` Jan Beulich
2012-10-18  7:24           ` Stefan Bader
2012-10-17 14:51   ` Jan Beulich
2012-10-17 15:12     ` Andrew Cooper

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=50811047.4080200@canonical.com \
    --to=stefan.bader@canonical.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=konrad.wilk@oracle.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 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).