[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140328095457.GC2176@pek-khao-d1.corp.ad.wrs.com>
Date: Fri, 28 Mar 2014 17:54:57 +0800
From: Kevin Hao <haokexin@...il.com>
To: "Dongsheng.Wang@...escale.com" <Dongsheng.Wang@...escale.com>
Cc: "fweisbec@...il.com" <fweisbec@...il.com>,
James Hogan <james.hogan@...tec.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Peter Zijlstra <peterz@...radead.org>,
Helge Deller <deller@....de>, "H. Peter Anvin" <hpa@...or.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Paul Mackerras <paulus@....ibm.com>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Jason.Jin@...escale.com" <Jason.Jin@...escale.com>,
Scott Wood <scottwood@...escale.com>,
Thomas Gleixner <tglx@...utronix.de>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Ingo Molnar <mingo@...nel.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [PATCH] powerpc/irq: Remove HAVE_IRQ_EXIT_ON_IRQ_STACK feature
at powerpc platform
On Fri, Mar 28, 2014 at 09:00:13AM +0000, Dongsheng.Wang@...escale.com wrote:
> Thanks Kevin. Your patch works normal. :)
>
> I still have some confused. I think when __do_softirq always get a interrupt, the hard stack will be run out, isn't it?
No, it won't. Please see the explanation in the following commit log.
commit cc1f027454929924471bea2f362431072e3c71be
Author: Frederic Weisbecker <fweisbec@...il.com>
Date: Tue Sep 24 17:17:47 2013 +0200
irq: Optimize softirq stack selection in irq exit
If irq_exit() is called on the arch's specified irq stack,
it should be safe to run softirqs inline under that same
irq stack as it is near empty by the time we call irq_exit().
For example if we use the same stack for both hard and soft irqs here,
the worst case scenario is:
hardirq -> softirq -> hardirq. But then the softirq supersedes the
first hardirq as the stack user since irq_exit() is called in
a mostly empty stack. So the stack merge in this case looks acceptable.
Stack overrun still have a chance to happen if hardirqs have more
opportunities to nest, but then it's another problem to solve.
So lets adapt the irq exit's softirq stack on top of a new Kconfig symbol
that can be defined when irq_exit() runs on the irq stack. That way
we can spare some stack switch on irq processing and all the cache
issues that come along.
Thanks,
Kevin
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists