From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 1 May 2013 13:55:49 +0200 From: Ingo Molnar To: Andi Kleen Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, stable@vger.kernel.org, eranian@google.com, Andi Kleen Subject: Re: [PATCH 1/2] Fix perf LBR filtering Message-ID: <20130501115549.GA19811@gmail.com> References: <1366844694-2770-1-git-send-email-andi@firstfloor.org> <20130425162535.GA5828@dyad.programming.kicks-ass.net> <20130425164100.GC16732@two.firstfloor.org> <20130425164837.GD5828@dyad.programming.kicks-ass.net> <20130425170037.GD16732@two.firstfloor.org> <20130425171842.GA8669@dyad.programming.kicks-ass.net> <20130425174211.GE16732@two.firstfloor.org> <20130426075601.GB8669@dyad.programming.kicks-ass.net> <20130426194633.GF16732@two.firstfloor.org> <20130501115125.GA19497@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130501115125.GA19497@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: * Ingo Molnar wrote: > > I don't think you want to spend that many cycles in the NMI > > handler for a dubious feature. Ok in theory you could > > add something with binary search, but that would be quite > > a bit of effort and it would be probably challenging > > to do that all NMI safe. > > If anyone using LBR sees that overhead it can be improved. You or others > who care can improve it. Also, improving the performance of is_module_text() shouldn't be too hard: an RCU rbtree should be enough. It's NMI-safe: when the rb-tree is in the middle of a rotation we'll simply not find the address and 'revert' to the worst case non-filtering your patch does all the time, but in the likely case it does find it and works as expected. Thanks, Ingo