From: Steven Rostedt <rostedt@goodmis.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de
Subject: Re: [PATCH RT] sched: let softirq_count() return !0 if inside local_bh_disable()ed section
Date: Tue, 22 May 2018 11:53:11 -0400 [thread overview]
Message-ID: <20180522115311.0fee528a@gandalf.local.home> (raw)
In-Reply-To: <20180517102214.orea3ol6dj7wvpf5@linutronix.de>
On Thu, 17 May 2018 12:22:14 +0200
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> I don't see a reason why softirq_count() shouldn't reflect the fact that
> we are within a local_bh_disable() section. I *think* it was done
> primary because in RT the softirq is slightly different (and
> preemptible) and it broke some of RCU's assumptions.
> I don't see any fallout with this change. Furthermore, all checks like
> "WARN_ON(!softirq_count())" will work and we can drop the workaround we
> currently have in the queue.
Looks to keep the paradigm closer to vanilla Linux to me.
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> include/linux/preempt.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/preempt.h b/include/linux/preempt.h
> index 0591df500e9d..d8c05a2626ca 100644
> --- a/include/linux/preempt.h
> +++ b/include/linux/preempt.h
> @@ -91,7 +91,7 @@
> # define softirq_count() (preempt_count() & SOFTIRQ_MASK)
> # define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET)
> #else
> -# define softirq_count() (0UL)
> +# define softirq_count() (current->softirq_nestcnt)
> extern int in_serving_softirq(void);
> #endif
>
prev parent reply other threads:[~2018-05-22 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 10:22 [PATCH RT] sched: let softirq_count() return !0 if inside local_bh_disable()ed section Sebastian Andrzej Siewior
2018-05-22 15:53 ` Steven Rostedt [this message]
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=20180522115311.0fee528a@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--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 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).