linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DEBUG_STACKOVERFLOW issue on ARM
@ 2012-10-03 11:48 trisha yad
  2012-10-05  8:31 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: trisha yad @ 2012-10-03 11:48 UTC (permalink / raw)
  To: Russell King - ARM Linux, linux-kernel, Ralf Baechle

Dear All,
In kernel 3.0.X we find "Check for stackoverflow"
(CONFIG_DEBUG_STACKOVERFLOW) implementation for following
architecture:
frv, mn10300, m32r, tile, x86, mips, powerpc, blackfin except ARM.

Therefore we implemented the similar functionality for ARM in asm_do_IRQ();
We have tested it using a test module.ko that allocate memory on kernel stack.

This test code work fine on single core, but fail to detect stack
overflow in multi-core ARM. While debugging we found that
interrupts were occurring only in CPU0, while the test module was
running in CPU1, since the kernel stack of CPU0 is unaffected
by CPU1 kernel stack, it fails to detect the problem.

However when I upgraded the kernel from 3.0 to 3.4, the stack overflow
detection started working.

I wish to know how can I support this function in 3.0 ?

Regards

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DEBUG_STACKOVERFLOW issue on ARM
  2012-10-03 11:48 DEBUG_STACKOVERFLOW issue on ARM trisha yad
@ 2012-10-05  8:31 ` Russell King - ARM Linux
  2012-10-11  7:39   ` vaibhav shinde
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2012-10-05  8:31 UTC (permalink / raw)
  To: trisha yad; +Cc: linux-kernel, Ralf Baechle

On Wed, Oct 03, 2012 at 05:18:56PM +0530, trisha yad wrote:
> I wish to know how can I support this function in 3.0 ?

If your description is correct, then all you need to do is to ensure
that you route interrupts to other CPUs.

You can do that by running the userspace irqbalance daemon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DEBUG_STACKOVERFLOW issue on ARM
  2012-10-05  8:31 ` Russell King - ARM Linux
@ 2012-10-11  7:39   ` vaibhav shinde
  2012-10-11  8:01     ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: vaibhav shinde @ 2012-10-11  7:39 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: trisha yad, linux-kernel, Ralf Baechle

Hi Russel,

On Fri, Oct 5, 2012 at 2:01 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
>
> On Wed, Oct 03, 2012 at 05:18:56PM +0530, trisha yad wrote:
> > I wish to know how can I support this function in 3.0 ?
>
> If your description is correct, then all you need to do is to ensure
> that you route interrupts to other CPUs.
>
> You can do that by running the userspace irqbalance daemon.
>

I also tried with the irqbalance daemon, on ARM quad core architecture,
and as per my understanding, the daemon sets the
/proc/irq/<irq.no.>/smp_affinity
file according to the irq frequency on a particular processor.

          However, the daemon doesn't work as expected, I also tried
accessing the
proc file mentioned above to set the cpu mask for particular irq, but this
just block the processing of the irq, as I see the count of that irq
doesnt increase
in /proc/interrupts.

            My conclusion is that the irqbalancing is not supported on
ARM arch or there is
something  more required for this to work. Kindly provide some
pointers over this.

Regards,
Vaibhav

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DEBUG_STACKOVERFLOW issue on ARM
  2012-10-11  7:39   ` vaibhav shinde
@ 2012-10-11  8:01     ` Russell King - ARM Linux
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2012-10-11  8:01 UTC (permalink / raw)
  To: vaibhav shinde; +Cc: trisha yad, linux-kernel, Ralf Baechle

On Thu, Oct 11, 2012 at 01:09:46PM +0530, vaibhav shinde wrote:
> Hi Russel,
> 
> On Fri, Oct 5, 2012 at 2:01 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> >
> > On Wed, Oct 03, 2012 at 05:18:56PM +0530, trisha yad wrote:
> > > I wish to know how can I support this function in 3.0 ?
> >
> > If your description is correct, then all you need to do is to ensure
> > that you route interrupts to other CPUs.
> >
> > You can do that by running the userspace irqbalance daemon.
> >
> 
> I also tried with the irqbalance daemon, on ARM quad core architecture,
> and as per my understanding, the daemon sets the
> /proc/irq/<irq.no.>/smp_affinity
> file according to the irq frequency on a particular processor.
> 
>           However, the daemon doesn't work as expected, I also tried
> accessing the
> proc file mentioned above to set the cpu mask for particular irq, but this
> just block the processing of the irq, as I see the count of that irq
> doesnt increase
> in /proc/interrupts.
> 
>             My conclusion is that the irqbalancing is not supported on
> ARM arch or there is
> something  more required for this to work. Kindly provide some
> pointers over this.

Sounds like something has been broken, no idea what.  It needs investigation.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-11  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-03 11:48 DEBUG_STACKOVERFLOW issue on ARM trisha yad
2012-10-05  8:31 ` Russell King - ARM Linux
2012-10-11  7:39   ` vaibhav shinde
2012-10-11  8:01     ` Russell King - ARM Linux

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).