From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Triplett Subject: Re: [PATCH v2 6/7] x86: Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK Date: Mon, 10 Mar 2014 10:20:38 -0700 Message-ID: <20140310172037.GA3052@leaf> References: <5a5942a0cdb0914ecd81d2880190c19abb228511.1394418994.git.josh@joshtriplett.org> <20140310161408.GF14639@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Suravee Suthikulpanit , David Herrmann , Stephane Eranian , linux-kernel@vger.kernel.org, Paul Gortmaker , Paul Mackerras , "H. Peter Anvin" , Thomas Gleixner , Andi Kleen , x86@kernel.org, Ingo Molnar , oprofile-list@lists.sf.net, Mel Gorman , Arnaldo Carvalho de Melo , Borislav Petkov , Dave Young , Peter Zijlstra , Gleb Natapov , Steven Rostedt , Bin Gao , Matt Fleming , Jacob Shin , Oleg Nesterov , Torsten Kaiser Return-path: Content-Disposition: inline In-Reply-To: <20140310161408.GF14639@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: oprofile-list-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Mon, Mar 10, 2014 at 05:14:11PM +0100, Frederic Weisbecker wrote: > On Sun, Mar 09, 2014 at 08:12:53PM -0700, Josh Triplett wrote: > > From: Andi Kleen > > > > Make HW_BREAKPOINTS a config option. HW_BREAKPOINTS depends on perf. > > This allows disabling PERF_EVENTS for systems that don't need it (e.g. > > anything not used for development) This then allows disabling IRQ_WORK > > and INSTRUCTION_DECODER. > > > > This change reduces the size of allnoconfig by 161k, a full 7.6% > > reduction: > > text data bss dec hex filename > > 788816 131952 1214432 2135200 2094a0 vmlinux-allnoconfig-with-perf > > 666361 93020 1214368 1973749 1e1df5 vmlinux-allnoconfig-no-perf > > > > bloat-o-meter summary: > > add/remove: 1/1040 grow/shrink: 1/25 up/down: 82/-152214 (-152132) > > My review hasn't changed much since last time (https://lkml.org/lkml/2013/10/4/483), > so I'm mostly copy pasting it here so that we can discuss if you want: > > I'm personally not against the idea of allowing hw breakpoint support > to be disabled but hpa did not like much the idea. I must say he had > valid concerns though, see the thread of this patchset: https://lkml.org/lkml/2011/7/14/163 > > IMHO, a better solution would be to make the hw breakpoint subsystem work > without using perf. It looks like hpa's concern was primarily that it should be possible to have CONFIG_HW_BREAKPOINTS=y without CONFIG_PERF_EVENTS. I agree, but since right now you can't have *either* of them disabled, allowing both to be disabled seems like an improvement. > > +config HW_BREAKPOINTS > > + bool "Enable hardware breakpoints support" if EXPERT > > + default y > > + select HAVE_HW_BREAKPOINT > > + select HAVE_MIXED_BREAKPOINTS_REGS > > + ---help--- > > + Enable support for x86 hardware breakpoints for debuggers > > + and perf. This will implicitly enable perf-events. > > + > > HW_BREAKPOINTS must depend on HAVE_HW_BREAKPOINT, not the other way round. > HAVE_* Kconfig symbols must only express constant backend support, not a variable user choice... > > ie, that's what I did in this patchset > https://lkml.org/lkml/2011/7/14/163 Fair enough. - Josh Triplett ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech