From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/3] spinlock: use local_irq_disable() instead of local_irq_save() where possible
Date: Fri, 9 Jan 2015 11:27:45 -0500 [thread overview]
Message-ID: <20150109162745.GI2726@l.oracle.com> (raw)
In-Reply-To: <54AFFD3A.2010005@citrix.com>
On Fri, Jan 09, 2015 at 04:09:30PM +0000, Andrew Cooper wrote:
> On 09/01/15 16:02, Konrad Rzeszutek Wilk wrote:
> > On Thu, Jan 08, 2015 at 04:13:03PM +0000, Jan Beulich wrote:
> >> ... as generally being a cheaper operation.
> > I was wondering if it would be possible to change some of the
> > EFLAGS after when we go in the 'cpu_relax' - and an interrupt
> > happens, we process it, alter the EFLAGS, then when we are
> > done, the EFLAGS are different - which the original code would
> > save when it was done sitting on the cpu_relax() loop.
> >
> > Actually that sounds bad - we only want to restore the flags
> > that we had when going in this spin lock. Would make sense
> > to add an ASSERT to check for flags being different from the
> > EFLAGS?
>
> local_irq_restore() only restores the interrupt flag from flags. All
> other bits in EFLAGS are unmodified.
which I would have found out if I read the code from local_irq_restore().
Sorry about the noise - should have looked at the code before asking
questions!
>
> ~Andrew
next prev parent reply other threads:[~2015-01-09 16:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 16:00 [PATCH 0/3] XSA-114 follow-ups Jan Beulich
2015-01-08 16:13 ` [PATCH 1/3] spinlock: use local_irq_disable() instead of local_irq_save() where possible Jan Beulich
2015-01-09 16:02 ` Konrad Rzeszutek Wilk
2015-01-09 16:09 ` Jan Beulich
2015-01-09 16:09 ` Andrew Cooper
2015-01-09 16:27 ` Konrad Rzeszutek Wilk [this message]
2015-01-08 16:13 ` [PATCH 2/3] rwlock: allow arch to override read_unlock() atomic Jan Beulich
2015-01-08 16:14 ` [PATCH 3/3] rwlock: allow arch to override write_unlock() atomic Jan Beulich
2015-01-08 16:28 ` [PATCH 0/3] XSA-114 follow-ups Tim Deegan
2015-01-09 10:23 ` 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=20150109162745.GI2726@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.