From: Juergen Gross <juergen.gross@fujitsu-siemens.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch] don't spin with irq disabled
Date: Thu, 26 Mar 2009 13:36:05 +0100 [thread overview]
Message-ID: <49CB76B5.3040902@fujitsu-siemens.com> (raw)
In-Reply-To: <49CB81C2.76E4.0078.0@novell.com>
Jan Beulich wrote:
>>>> Juergen Gross <juergen.gross@fujitsu-siemens.com> 26.03.09 10:00 >>>
>> Attached patch reduces interrupt latency in lock handling.
>> spin_lock_irq and spin_lock_irqsave used to turn off IRQs and then tried to
>> get the lock. If the lock was already held, waiting for the lock was done with
>> IRQs still off.
>> The patch reenables IRQs during the wait loop.
>
> This is wrong - you must not enable interrupts if they weren't enabled upon
> entry to these two functions.
spin_lock_irq disables always IRQs. spin_unlock_irq enables always IRQs. They
are always used in pairs, so IRQs should always be enabled on entry of
spin_lock_irq.
I'm not enabling IRQs unconditionally in spin_lock_irqsave, of course, but use
the flags value saved before...
Did I miss something? Or did you refer only to my inexact comment above?
Juergen
--
Juergen Gross Principal Developer
IP SW OS6 Telephone: +49 (0) 89 636 47950
Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com
Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com
D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html
next prev parent reply other threads:[~2009-03-26 12:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 9:00 [Patch] don't spin with irq disabled Juergen Gross
2009-03-26 12:23 ` Jan Beulich
2009-03-26 12:36 ` Juergen Gross [this message]
2009-03-27 7:41 ` Jan Beulich
2009-03-27 9:09 ` Keir Fraser
2009-03-27 17:00 ` spinlock requests (was RE: [Patch] don't spin with irq disabled) Dan Magenheimer
2009-03-27 17:46 ` Keir Fraser
2009-03-27 18:00 ` Dan Magenheimer
2009-03-27 18:12 ` Keir Fraser
2009-04-02 23:08 ` Dan Magenheimer
2009-04-03 7:17 ` Keir Fraser
2009-03-30 6:11 ` Juergen Gross
2009-03-31 13:12 ` Dan Magenheimer
2009-03-31 13:40 ` Juergen Gross
2009-03-31 13:48 ` Keir Fraser
2009-03-31 19:00 ` Jeremy Fitzhardinge
2009-03-31 20:57 ` Keir Fraser
2009-03-31 21:16 ` Jeremy Fitzhardinge
2009-03-26 14:27 ` [Patch] don't spin with irq disabled Keir Fraser
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=49CB76B5.3040902@fujitsu-siemens.com \
--to=juergen.gross@fujitsu-siemens.com \
--cc=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.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 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.