[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200504130451.7aef72b1@gandalf.local.home>
Date: Mon, 4 May 2020 13:04:51 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Joerg Roedel <jroedel@...e.de>,
linux-kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Shile Zhang <shile.zhang@...ux.alibaba.com>,
Andy Lutomirski <luto@...capital.net>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Tzvetomir Stoyanov <tz.stoyanov@...il.com>
Subject: Re: [PATCH] percpu: Sync vmalloc mappings in pcpu_alloc() and
free_percpu()
On Mon, 4 May 2020 11:38:43 -0400 (EDT)
Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
> ----- On May 4, 2020, at 11:31 AM, Joerg Roedel jroedel@...e.de wrote:
>
> > On Mon, May 04, 2020 at 11:28:46AM -0400, Mathieu Desnoyers wrote:
> >> ----- On May 4, 2020, at 11:12 AM, Joerg Roedel jroedel@...e.de wrote:
> >> Placing this here is inefficient. It syncs mappings for each percpu allocation.
> >> I would recommend moving it right after __vmalloc() is called to allocate the
> >> underlying memory chunk instead:
> >>
> >> static void *pcpu_mem_zalloc(size_t size, gfp_t gfp)
> >> {
> >
> > Tried this before, actually I put it into the caller of
> > pcpu_mem_zalloc(), but that didn't fix the problem for me. Stevens
> > test-case still hangs the machine.
>
> That's unexpected.
>
> Did you confirm that those hangs were also caused by percpu allocations ?
>
> Maybe adding the vmalloc_sync_mappings() at each percpu allocation happens
> to luckily sync mappings after some other vmalloc.
>
It doesn't surprise me because my alloc_percpu() call never gets to that
path. But systemd does hit it for me earlier on.
-- Steve
Powered by blists - more mailing lists