From: Peter Zijlstra <peterz@infradead.org>
To: Nick Piggin <npiggin@suse.de>
Cc: akpm <akpm@linux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
linux-kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: irq-disabled vs vmap vs text_poke
Date: Fri, 13 Feb 2009 14:02:18 +0100 [thread overview]
Message-ID: <1234530138.6519.38.camel@twins> (raw)
In-Reply-To: <20090213125505.GE18462@wotan.suse.de>
On Fri, 2009-02-13 at 13:55 +0100, Nick Piggin wrote:
> On Fri, Feb 13, 2009 at 01:50:07PM +0100, Peter Zijlstra wrote:
> > Hi,
> >
> > Ingo got the following splat:
<snip splat>
> > Which points to vunmap() being called with interrupts disabled.
> >
> > Which made me look at the vmap/vunmap calls, and they appear to not be
> > irq-safe, therefore this would be a bug in text_poke().
> >
> > [ that is, vmap() can end up calling get_vm_area_caller() which in turn
> > calls __get_vm_area_node() with GFP_KERNEL, ergo, don't do this from
> > an atomic context. ]
> >
> > Now text_poke() uses local_irq_save/restore(), which conveys that it can
> > be called with IRQs disabled, which is exactly what happens in the trace
> > above, however we just established that vmap/vunmap() are not irq-safe.
> >
> > Anybody got an idea on how to fix this?
>
> Oh, I thought the consensus was not to use vmap for this?
Seems like a sensible consensus, still that means text_poke() needs some
TLC.
> With a bit of work, we can make vunmap irq-safe with the lazy vunmapping
> infrastructure (vmap could also be irq-safe, but would be subject to
> spurious failures due to being unable to flush lazy vunmaps.
*nod*
> I think I got a mostly working patch cobbled together sitting here
> somewhere. I was waiting for some _really_ good use case before spending
> more time on it. I would prefer if at all possible to do vmap operations
> in sleepable, process context.
Agreed, I think we want to fix text_poke() and make the vmap/vunmap()
ops yell louder at violations of these rules.
I'm just totally clueless wrt text_poke() hence this email ;-)
next prev parent reply other threads:[~2009-02-13 13:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 12:50 irq-disabled vs vmap vs text_poke Peter Zijlstra
2009-02-13 12:55 ` Nick Piggin
2009-02-13 13:02 ` Peter Zijlstra [this message]
2009-02-13 13:04 ` Ingo Molnar
2009-02-13 14:25 ` Mathieu Desnoyers
2009-02-13 14:33 ` Peter Zijlstra
2009-02-13 14:43 ` Mathieu Desnoyers
2009-02-13 18:05 ` Ingo Molnar
2009-02-13 13:05 ` Peter Zijlstra
2009-02-13 13:09 ` Nick Piggin
2009-02-13 14:18 ` Mathieu Desnoyers
2009-02-13 14:28 ` Peter Zijlstra
2009-02-13 16:32 ` Masami Hiramatsu
2009-02-13 16:38 ` Peter Zijlstra
2009-02-13 16:55 ` Mathieu Desnoyers
2009-02-13 18:14 ` Masami Hiramatsu
2009-02-13 18:57 ` Mathieu Desnoyers
2009-02-13 21:41 ` Masami Hiramatsu
2009-02-16 15:04 ` Masami Hiramatsu
2009-02-16 15:31 ` Nick Piggin
2009-02-16 17:24 ` Mathieu Desnoyers
2009-02-17 2:00 ` Masami Hiramatsu
2009-02-17 3:03 ` Nick Piggin
2009-02-17 8:31 ` Peter Zijlstra
2009-02-17 17:13 ` Masami Hiramatsu
2009-02-17 16:48 ` Masami Hiramatsu
2009-02-17 17:02 ` Steven Rostedt
2009-02-17 17:18 ` Mathieu Desnoyers
2009-02-17 17:24 ` Steven Rostedt
2009-02-17 17:28 ` Mathieu Desnoyers
2009-02-17 17:48 ` Steven Rostedt
2009-02-13 14:27 ` [PATCH] x86: text_poke might sleep Mathieu Desnoyers
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=1234530138.6519.38.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=npiggin@suse.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