From: Frederic Weisbecker <frederic@kernel.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: preempt.h: some SOFTIRQ_OFFSET should be SOFTIRQ_MASK?
Date: Wed, 13 Feb 2019 05:05:40 +0100 [thread overview]
Message-ID: <20190213040539.GA8524@lenoir> (raw)
In-Reply-To: <CAK1hOcN8_0MNEFfoHg0sAuu09SPhXHvXfXkeHONtoFXOArjumg@mail.gmail.com>
On Tue, Feb 05, 2019 at 07:34:31PM +0100, Denys Vlasenko wrote:
> SOFTIRQ is a counter.
> Why here:
>
> #define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET)
> #define in_task() (!(preempt_count() & \
> (NMI_MASK | HARDIRQ_MASK | SOFTIRQ_OFFSET)))
>
> we check only lowest bit?
So we have SOFTIRQ_OFFSET that is used when serving softirqs.
And we have SOFTIRQ_DISABLE_OFFSET that is used when we disable
softirqs.
I think the choice is right on both tests above, or am I missing something?
next prev parent reply other threads:[~2019-02-13 4:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 18:34 preempt.h: some SOFTIRQ_OFFSET should be SOFTIRQ_MASK? Denys Vlasenko
2019-02-13 4:05 ` Frederic Weisbecker [this message]
2019-02-13 10:37 ` Denys Vlasenko
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=20190213040539.GA8524@lenoir \
--to=frederic@kernel.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vda.linux@googlemail.com \
/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.