lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf_events: improve DS/BTS/PEBS buffer allocation
From
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.

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.


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