From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C05852C009B for ; Thu, 16 Aug 2012 17:40:29 +1000 (EST) Message-ID: <1345102812.31459.114.camel@twins> Subject: Re: powerpc/perf: hw breakpoints return ENOSPC From: Peter Zijlstra To: Michael Neuling Date: Thu, 16 Aug 2012 09:40:12 +0200 In-Reply-To: <28857.1345091034@neuling.org> References: <28857.1345091034@neuling.org> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Cc: Ingo Molnar , Frederic Weisbecker , K Prasad , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2012-08-16 at 14:23 +1000, Michael Neuling wrote: >=20 > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > despite there being no breakpoint on this CPU. This is because the call > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > POWER7 only has one hardware breakpoint per CPU (ie. HBP_NUM=3D1), so we > return ENOSPC. I think this comes from the ptrace legacy, we register a breakpoint on all cpus because when we migrate a task it cannot fail to migrate the breakpoint. Its one of the things I hate most about the hwbp stuff as it relates to perf. Frederic knows more...