From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Christian Ruppert <christian.ruppert@abilis.com>,
Thomas Gleixner <tglx@linutronix.de>,
Pierrick Hascoet <pierrick.hascoet@abilis.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFC] Add implicit barriers to irqsave/restore class of functions
Date: Fri, 5 Apr 2013 09:57:13 +0530 [thread overview]
Message-ID: <515E52A1.2080704@synopsys.com> (raw)
In-Reply-To: <1365091982.2609.97.camel@laptop>
Hi Peter,
On 04/04/2013 09:43 PM, Peter Zijlstra wrote:
> - : "cc");
> + : "memory", "cc");
> That's not a memory barrier, that a memory clobber, aka a compiler
> barrier.
For the problem under consideration we indeed want a compiler barrier because the
error shows up due to a stale register which is live across a spinlock for
!PREEMPT_COUNT config.
However IMO doing this in irq save/restore macros is semantically incorrect since
those macros might be used elsewhere which don't need the compiler reload reg
semantics. Further per tglx' suggestion fixing preempt_* macros for !PREEMPT_COUNT
case would fix this independent of what arch is doing.
A patch to that effect was already posted to lists:
http://www.spinics.net/lists/kernel/msg1510885.html
Please let us know what you think.
Thx,
-Vineet
next prev parent reply other threads:[~2013-04-05 4:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 10:33 [PATCH] timer: Fix possible issues with non serialized timer_pending( ) Vineet Gupta
2013-04-03 7:20 ` Vineet Gupta
2013-04-03 8:53 ` Christian Ruppert
2013-04-03 12:36 ` Thomas Gleixner
2013-04-03 13:03 ` Christian Ruppert
2013-04-03 13:10 ` [RFC] Add implicit barriers to irqsave/restore class of functions Christian Ruppert
2013-04-03 13:29 ` Vineet Gupta
2013-04-04 8:26 ` Christian Ruppert
2013-04-04 16:13 ` Peter Zijlstra
2013-04-05 4:27 ` Vineet Gupta [this message]
2013-04-03 14:11 ` [PATCH] [PATCH] Gaurantee spinlocks implicit barrier for !PREEMPT_COUNT Vineet Gupta
2013-04-04 15:28 ` Christian Ruppert
2013-04-05 4:36 ` Vineet Gupta
2013-04-06 13:34 ` Vineet Gupta
2013-04-06 16:13 ` Linus Torvalds
2013-04-06 18:01 ` Linus Torvalds
2013-04-06 19:54 ` Jacquiot, Aurelien
2013-04-06 19:54 ` Jacquiot, Aurelien
2013-04-09 16:33 ` [PATCH] tile: comment assumption about __insn_mtspr for <asm/irqflags.h> Chris Metcalf
2013-04-09 16:33 ` Chris Metcalf
2013-04-08 4:20 ` [PATCH] [PATCH] Gaurantee spinlocks implicit barrier for !PREEMPT_COUNT Vineet Gupta
2013-04-08 4:48 ` Linus Torvalds
2013-04-08 13:37 ` Peter Zijlstra
2013-04-08 14:31 ` Steven Rostedt
2013-04-08 14:50 ` Linus Torvalds
2013-04-08 14:59 ` Steven Rostedt
2013-04-08 15:07 ` Linus Torvalds
2013-04-09 14:32 ` Linus Torvalds
2013-04-10 7:12 ` Peter Zijlstra
2013-04-08 14:05 ` Steven Rostedt
2013-04-08 4:49 ` Linus Torvalds
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=515E52A1.2080704@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=christian.ruppert@abilis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pierrick.hascoet@abilis.com \
--cc=tglx@linutronix.de \
/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.