linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 3/3] arm64: Add do_softirq_own_stack() and enable irq_stacks
Date: Tue, 08 Dec 2015 10:11:58 +0000	[thread overview]
Message-ID: <5666ACEE.9070303@arm.com> (raw)
In-Reply-To: <20151204131242.GG10123@e104818-lin.cambridge.arm.com>

On 04/12/15 13:12, Catalin Marinas wrote:
> One thing I'm not clear about is whether __do_softirq can be preempted
> when executed in process context, it could mess up our stack
> assumptions.

Previously I thought not, because in __do_softirq():
> __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET);

Increases the softirq part of preempt_count, before:
> local_irq_enable()

so preempt_count is always non-zero when we have interrupts (re)enabled
on the irq_stack...

... but its a little murkier than I first thought,
__cond_resched_softirq() looks like it will re-schedule a task if it is
processing softirqs, while softirqs are disabled.

net/core/sock.c:__release_sock is the only caller, I haven't yet worked
out if this can happen while on the irq stack.


James

  reply	other threads:[~2015-12-08 10:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 18:22 [PATCH v7 0/3] arm64: Add support for IRQ stack James Morse
2015-11-16 18:22 ` [PATCH v7 1/3] arm64: Add irq_stack boiler plate, store struct task_info in sp_el0 James Morse
2015-11-28 16:32   ` Jungseok Lee
2015-12-04 11:00     ` James Morse
2015-11-16 18:22 ` [PATCH v7 2/3] arm64: Modify stack trace and dump for use with irq_stack James Morse
2015-11-16 18:22 ` [PATCH v7 3/3] arm64: Add do_softirq_own_stack() and enable irq_stacks James Morse
2015-11-19 14:26   ` Jungseok Lee
2015-11-27 11:47     ` Catalin Marinas
2015-11-27 15:37       ` Jungseok Lee
2015-11-27 17:38         ` Catalin Marinas
2015-11-28 16:04           ` Jungseok Lee
2015-12-04 11:00       ` James Morse
2015-12-04 13:12         ` Catalin Marinas
2015-12-08 10:11           ` James Morse [this message]
2015-11-27 15:09   ` Catalin Marinas

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=5666ACEE.9070303@arm.com \
    --to=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).