From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758623Ab0EYBHS (ORCPT ); Mon, 24 May 2010 21:07:18 -0400 Received: from ozlabs.org ([203.10.76.45]:48455 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758501Ab0EYBHQ (ORCPT ); Mon, 24 May 2010 21:07:16 -0400 Date: Tue, 25 May 2010 10:55:28 +1000 From: Paul Mackerras To: Peter Zijlstra Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Frederic Weisbecker , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] perf: Disallow mmap() on per-task inherited events Message-ID: <20100525005528.GB30395@drongo> References: <20100518133258.000434886@chello.nl> <20100518133725.885757039@chello.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100518133725.885757039@chello.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 18, 2010 at 03:32:59PM +0200, Peter Zijlstra wrote: > Since we now have working per-task-per-cpu events for a while, > disallow mmap() on per-task inherited events. Those things were > a performance problem anyway, and doing away with it allows > us to optimize the buffer somewhat by assuming there is only a single > writer. This also disallows user-space access to hardware counter for this event -- which is arguably OK, since doing the userspace read would give a different answer to read() on the event fd, as the read() sums up all the child counters for us. Nevertheless, I think this side-effect is worth mentioning. Paul.