lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] perf_events: improve DS/BTS/PEBS buffer allocation
From
Date
On Mon, 2010-09-13 at 20:49 +0200, Stephane Eranian wrote:
> On Mon, Sep 13, 2010 at 8:42 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, 2010-09-13 at 20:40 +0200, Stephane Eranian wrote:
> >> Ok, so can we play the same trick you're playing with the sampling
> >> buffer, i.e., you use alloc_pages_node() for one page at a time, and
> >> then you stitch them on demand via SW?
> >
> > Not for BTS, it wants a linear range, getting the vmalloc vs NMI thing
> > sorted would be best I think.
> >
> What is annoying in this is that you run into the problem even though
> you may not be using BTS nor PEBS.

Yes, one thing we could do is simply disable BTS when we fail that
alloc, instead of fail everything.

> What mitigates the problem, I think, is the NMI watchdog. It is the first
> user of perf_events. As such, the BTS and PEBS buffers get allocated
> during kernel initialization thereby increasing the chances of finding
> contiguous chunks of memory. What would partly help would be to use of
> kmalloc_node() to at least balance allocations amongst the various NUMA
> nodes. That would be until the vmalloc() vs. NMI is sorted out.

Right, that would be a simple change to make.


\
 
 \ /
  Last update: 2010-09-13 21:01    [W:0.136 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site