[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71ea8331-78da-c22b-d46d-99ab6c187bbf@nokia.com>
Date: Mon, 28 Aug 2017 12:07:54 +0200
From: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@...ia.com>
To: Matt Redfearn <matt.redfearn@...tec.com>,
Ralf Baechle <ralf@...ux-mips.org>
Cc: linux-mips@...ux-mips.org,
Marcin Nowakowski <marcin.nowakowski@...tec.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Paul Burton <paul.burton@...tec.com>
Subject: Re: [PATCH] MIPS: Revert "MIPS: Fix race on setting and getting
cpu_online_mask"
On 08/23/2017 10:21 AM, Matt Redfearn wrote:
> As noted in the commit message, upstream differs in this area. The
> hotplug code now waits on a completion event in bringup_wait_for_ap,
> which is set by the starting CPU in cpuhp_online_idle once it calls
> cpu_startup_entry. Thus there is no possibility of a race in upstream,
> and this commit has only re-introduced the deadlock condition, which can
> be observed on multiple platforms when running a heavy load test at the
> same time as hotplugging CPUs. See commit 8f46cca1e6c06 ("MIPS: SMP: Fix
> possibility of deadlock when bringing CPUs online") for details.
I personally do not like the fact that synchronization is implicitly done by the callers, it is the reason why the patch was proposed. As noted before, it is enough someone checks cpu online mask somewhere in between and there is race again.
How about moving synchronise_count_slave before setting the cpu online? Is there dependency it has to be done after completion?
Regards,
Matija
Powered by blists - more mailing lists