From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758390AbdKGRYc (ORCPT ); Tue, 7 Nov 2017 12:24:32 -0500 Received: from mga07.intel.com ([134.134.136.100]:20140 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbdKGRYb (ORCPT ); Tue, 7 Nov 2017 12:24:31 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,359,1505804400"; d="scan'208";a="918600287" Date: Tue, 7 Nov 2017 09:24:29 -0800 From: Andi Kleen To: Milind Chabbi Cc: Peter Zijlstra , Jiri Olsa , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Namhyung Kim , Michael Ellerman , Hari Bathini , Jin Yao , Kan Liang , Sukadev Bhattiprolu , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf/core: fast breakpoint modification via _IOC_MODIFY_BREAKPOINT. Message-ID: <20171107172429.GG5320@tassilo.jf.intel.com> References: <1510006156-18988-1-git-send-email-chabbi.milind@gmail.com> <20171107081457.GE3326@worktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 07:43:35AM -0800, Milind Chabbi wrote: > Peter, > > Generic update perf_event_attr interface is noble but impractical. > It will cause a validation nightmare. > Many of the behaviors or choices will become hard to reason. I don't think you would necessarily need to support modifying all of this. Just define a general interface that could be used to modify these things, but right now it would be only implemented for the special case of breakpoints. Your ioctl is very near it anyways, just need to change the name and do more sanity checking on the input values. -Andi