• M
    kcsan: Rate-limit reporting per data races · 05f9a406
    Marco Elver 提交于
    KCSAN data-race reports can occur quite frequently, so much so as
    to render the system useless.  This commit therefore adds support for
    time-based rate-limiting KCSAN reports, with the time interval specified
    by a new KCSAN_REPORT_ONCE_IN_MS Kconfig option.  The default is 3000
    milliseconds, also known as three seconds.
    
    Because KCSAN must detect data races in allocators and in other contexts
    where use of allocation is ill-advised, a fixed-size array is used to
    buffer reports during each reporting interval.  To reduce the number of
    reports lost due to array overflow, this commit stores only one instance
    of duplicate reports, which has the benefit of further reducing KCSAN's
    console output rate.
    Reported-by: NQian Cai <cai@lca.pw>
    Suggested-by: NPaul E. McKenney <paulmck@kernel.org>
    Signed-off-by: NMarco Elver <elver@google.com>
    Signed-off-by: NPaul E. McKenney <paulmck@kernel.org>
    Signed-off-by: NIngo Molnar <mingo@kernel.org>
    05f9a406
Kconfig.kcsan 4.5 KB