lkml.org 
[lkml]   [2014]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v3] printk: allow increasing the ring buffer depending on the number of CPUs
    From
    Date
    On Fri, 2014-06-13 at 11:28 -0700, Luis R. Rodriguez wrote:
    > + /*
    > + * If you set log_buf_len=n kernel parameter LOG_CPU_MIN_BUF_SHIFT will
    > + * be ignored. LOG_CPU_MIN_BUF_SHIFT is a proactive measure for large
    > + * systems. With a LOG_BUF_SHIFT of 18 and LOG_CPU_MIN_BUF_SHIFT 12 at
    > + * we'd require more than 64 CPUs to trigger an increase from the
    > + * default.
    > + */
    > + if (!new_log_buf_len && (cpu_extra > __LOG_BUF_LEN / 2))
    ^ that ! looks wrong. We should be checking for log_buf_len set instead.

    > + new_log_buf_len = __LOG_BUF_LEN + cpu_extra;

    You could also move the whole thing below the return statement, that way
    we can avoid double checking new_log_buf_len. Otherwise looks kinda
    weird.
    >
    > if (!new_log_buf_len)
    > return;

    Thanks,
    Davidlohr



    \
     
     \ /
      Last update: 2014-06-14 00:21    [W:3.778 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site