From: Thomas Gleixner <tglx@linutronix.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-mips@linux-mips.org, linux-mm@kvack.org,
WireGuard mailing list <wireguard@lists.zx2c4.com>,
k@vodka.home.kg
Subject: Re: Proposal: HAVE_SEPARATE_IRQ_STACK?
Date: Wed, 9 Nov 2016 22:40:24 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1611092227200.3501@nanos> (raw)
In-Reply-To: <CAHmME9oSUcAXVMhpLt0bqa9DKHE8rd3u+3JDb_wgviZnOpP7JA@mail.gmail.com>
On Wed, 9 Nov 2016, Jason A. Donenfeld wrote:
> But for the remaining platforms, such as MIPS, this is still a
> problem. In an effort to work around this in my code, rather than
> having to invoke kmalloc for what should be stack-based variables, I
> was thinking I'd just disable preemption for those functions that use
> a lot of stack, so that stack-hungry softirq handlers don't crush it.
> This is generally unsatisfactory, so I don't want to do this
> unconditionally. Instead, I'd like to do some cludge such as:
>
> #ifndef CONFIG_HAVE_SEPARATE_IRQ_STACK
> preempt_disable();
That preempt_disable() prevents merily preemption as the name says, but it
wont prevent softirq handlers from running on return from interrupt. So
what's the point?
> However, for this to work, I actual need that config variable. Would
> you accept a patch that adds this config variable to the relavent
> platforms?
It might have been a good idea, to cc all relevant arch maintainers on
that ...
> If not, do you have a better solution for me (which doesn't
> involve using kmalloc or choosing a different crypto primitive)?
What's wrong with using kmalloc?
Thanks,
tglx
next prev parent reply other threads:[~2016-11-09 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 21:27 Proposal: HAVE_SEPARATE_IRQ_STACK? Jason A. Donenfeld
2016-11-09 21:40 ` Thomas Gleixner [this message]
2016-11-09 23:34 ` Jason A. Donenfeld
2016-11-10 9:03 ` Thomas Gleixner
2016-11-10 11:41 ` Jason A. Donenfeld
2016-11-10 13:00 ` Thomas Gleixner
2016-11-10 17:39 ` Jason A. Donenfeld
2016-11-10 16:36 ` Matt Redfearn
2016-11-10 17:37 ` Jason A. Donenfeld
2016-11-10 0:17 ` David Daney
2016-11-10 1:47 ` Jason A. Donenfeld
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=alpine.DEB.2.20.1611092227200.3501@nanos \
--to=tglx@linutronix.de \
--cc=Jason@zx2c4.com \
--cc=k@vodka.home.kg \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mm@kvack.org \
--cc=wireguard@lists.zx2c4.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 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).