From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753115AbcLGSDk (ORCPT ); Wed, 7 Dec 2016 13:03:40 -0500 Received: from foss.arm.com ([217.140.101.70]:44344 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbcLGSDj (ORCPT ); Wed, 7 Dec 2016 13:03:39 -0500 Date: Wed, 7 Dec 2016 17:53:47 +0000 From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Thomas Gleixner , Sebastian Andrzej Siewior , jeremy.linton@arm.com Subject: Re: Perf hotplug lockup in v4.9-rc8 Message-ID: <20161207175347.GB13840@leverpostej> References: <20161207135217.GA25605@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161207135217.GA25605@leverpostej> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 07, 2016 at 01:52:17PM +0000, Mark Rutland wrote: > Hi all > > Jeremy noticed a kernel lockup on arm64 when the perf tool was used in > parallel with hotplug, which I've reproduced on arm64 and x86(-64) with > v4.9-rc8. In both cases I'm using defconfig; I've tried enabling lockdep > but it was silent for arm64 and x86. It looks like we're trying to install a task-bound event into a context where task_cpu(ctx->task) is dead, and thus the cpu_function_call() in perf_install_in_context() fails. We retry repeatedly. On !PREEMPT (as with x86 defconfig), we manage to prevent the hotplug machinery from making progress, and this turns into a livelock. On PREEMPT (as with arm64 defconfig), I'm somewhat lost. Thanks, Mark.