lkml.org 
[lkml]   [2008]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ring_buffer: map to cpu not page

    * Steven Rostedt <rostedt@goodmis.org> wrote:

    > My original patch had a compile bug when NUMA was configured. I
    > referenced cpu when it should have been cpu_buffer->cpu.
    >
    > Ingo quickly fixed this bug by replacing cpu with 'i' because that was
    > the loop counter. Unfortunately, the 'i' was the counter of pages, not
    > CPUs. This caused a crash when the number of pages allocated for the
    > buffers exceeded the number of pages, which would usually be the case.
    >
    > Signed-off-by: Steven Rostedt <srostedt@redhat.com>

    > for (i = 0; i < nr_pages; i++) {
    > page = kzalloc_node(ALIGN(sizeof(*page), cache_line_size()),
    > - GFP_KERNEL, cpu_to_node(i));
    > + GFP_KERNEL, cpu_to_node(cpu_buffer->cpu));

    oh, stupid typo of the year :-)

    applied to tip/tracing/ring-buffer, thanks for tracking it down! I've
    reactivated the topic branch for tip/master and i'm running a few tests
    before pushing it out for wider testing.

    Ingo


    \
     
     \ /
      Last update: 2008-10-03 09:33    [W:4.370 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site