From: Tejun Heo <tj@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Joerg Roedel <jroedel@suse.de>, Ingo Molnar <mingo@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] x86/mm changes for v5.9
Date: Thu, 6 Aug 2020 15:57:26 -0400 [thread overview]
Message-ID: <20200806195726.GI4520@mtj.thefacebook.com> (raw)
In-Reply-To: <CAHk-=win5DxMK-MH57NSrA+nVxF60MYR9RyArPX5NW_0yaBpoA@mail.gmail.com>
On Thu, Aug 06, 2020 at 12:42:23PM -0700, Linus Torvalds wrote:
> that admittedly odd sequence is get_work_pwq(work)
>
> And then the faulting instruction is:
>
> > 2a:* 49 8b 46 08 mov 0x8(%r14),%rax <-- trapping instruction
>
> and this is the "->wq" dereference.
>
> So it's the pwq->wq that traps, with 'pwq' being the trapping base
> pointer, and clearly being in the vmalloc space.
>
> I think pwq may a percpu allocation, so not _directly_ vmalloc().
> Adding Tejun to the cc in case he can clarify ("No, silly Linus, it's
> allocated here..").
Hey, silly Linus, yeap, they're per-cpu allocations and will be in vmalloc
address space for per-cpu workqueues. For unbound workqueues, they're
regular kmallocs. The per-cpu allocation happens in alloc_and_link_pwqs():
static int alloc_and_link_pwqs(struct workqueue_struct *wq)
{
bool highpri = wq->flags & WQ_HIGHPRI;
int cpu, ret;
if (!(wq->flags & WQ_UNBOUND)) {
wq->cpu_pwqs = alloc_percpu(struct pool_workqueue);
if (!wq->cpu_pwqs)
return -ENOMEM;
Thanks.
--
tejun
next prev parent reply other threads:[~2020-08-06 19:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 19:03 [GIT PULL] x86/mm changes for v5.9 Ingo Molnar
2020-08-04 0:50 ` pr-tracker-bot
2020-08-05 11:03 ` Jason A. Donenfeld
2020-08-05 17:05 ` Linus Torvalds
2020-08-06 13:10 ` Ingo Molnar
2020-08-06 18:57 ` Joerg Roedel
2020-08-06 19:02 ` Linus Torvalds
2020-08-06 19:23 ` Joerg Roedel
2020-08-06 19:42 ` Linus Torvalds
2020-08-06 19:57 ` Tejun Heo [this message]
2020-08-07 9:53 ` Jason A. Donenfeld
2020-08-06 21:20 ` Ingo Molnar
2020-08-07 8:47 ` Joerg Roedel
2020-08-13 19:30 ` Ingo Molnar
2020-08-13 19:38 ` Linus Torvalds
2020-08-14 14:26 ` Joerg Roedel
2020-08-06 22:56 ` Joerg Roedel
2020-08-06 23:12 ` Joerg Roedel
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=20200806195726.GI4520@mtj.thefacebook.com \
--to=tj@kernel.org \
--cc=Jason@zx2c4.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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).