[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <F96BF662-BB11-4AFB-BF05-CB1720441A92@lca.pw>
Date: Mon, 20 Jan 2020 15:35:09 -0500
From: Qian Cai <cai@....pw>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
paulmck@...nel.org, tglx@...utronix.de, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched/core: fix illegal RCU from offline CPUs
> On Jan 20, 2020, at 5:17 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
> Bah.. that's horrible. Surely we can find a better place to do this in
> the whole hotplug machinery.
>
> Perhaps you can have takedown_cpu() do the mmdrop()?
The problem is that no all arch_cpu_idle_dead() will call idle_task_exit(). For example, alpha and parisc are not, so it needs to deal with some kind of ifdef dance in takedown_cpu() to conditionally call mmdrop() which sounds even more horrible?
If you really prefer it anyway, maybe something like touching every arch’s __cpu_die() to also call mmdrop() depends on arches?
BTW, how to obtain the other CPU’s current task mm? Is that cpu_rq(cpu)->curr->active_mm?
Powered by blists - more mailing lists