• S
    ring-buffer: only warn on wrap if buffer is bigger than two pages · 3554228d
    Steven Rostedt 提交于
    On boot up, to save memory, ftrace allocates the minimum buffer
    which is two pages. Ftrace also goes through a series of tests
    (when configured) on boot up. These tests can fill up a page within
    a single interrupt.
    
    The ring buffer also has a WARN_ON when it detects that the buffer was
    completely filled within a single commit (other commits are allowed to
    be nested).
    
    Combine the small buffer on start up, with the tests that can fill more
    than a single page within an interrupt, this can trigger the WARN_ON.
    
    This patch makes the WARN_ON only happen when the ring buffer consists
    of more than two pages.
    
    [ Impact: prevent false WARN_ON in ftrace startup tests ]
    Reported-by: NIngo Molnar <mingo@elte.hu>
    LKML-Reference: <20090421094616.GA14561@elte.hu>
    Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    3554228d
ring_buffer.c 75.2 KB