Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-07 Thread lijiang
在 2020年07月03日 19:54, John Ogness 写道: > On 2020-07-02, lijiang wrote: >> About the VMCOREINFO part, I made some tests based on the kernel patch >> v3, the makedumpfile and crash-utility can work as expected with your >> patch(userspace patch), but, unfortunately, the >> vmcore-dmesg(kexec-tools)

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-03 Thread lijiang
在 2020年07月02日 21:31, Petr Mladek 写道: > On Thu 2020-07-02 17:43:22, lijiang wrote: >> 在 2020年07月02日 17:02, John Ogness 写道: >>> On 2020-07-02, lijiang wrote: About the VMCOREINFO part, I made some tests based on the kernel patch v3, the makedumpfile and crash-utility can work as expected

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-03 Thread John Ogness
On 2020-07-02, lijiang wrote: > About the VMCOREINFO part, I made some tests based on the kernel patch > v3, the makedumpfile and crash-utility can work as expected with your > patch(userspace patch), but, unfortunately, the > vmcore-dmesg(kexec-tools) can't correctly read the printk ring buffer

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread Petr Mladek
On Thu 2020-07-02 17:43:22, lijiang wrote: > 在 2020年07月02日 17:02, John Ogness 写道: > > On 2020-07-02, lijiang wrote: > >> About the VMCOREINFO part, I made some tests based on the kernel patch > >> v3, the makedumpfile and crash-utility can work as expected with your > >> patch(userspace patch),

Re: buffer allocation: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread Petr Mladek
On Mon 2020-06-29 23:57:59, John Ogness wrote: > On 2020-06-29, Petr Mladek wrote: > >> @@ @@ void __init setup_log_buf(int early) > >> + prb_init(_rb_dynamic, > >> + new_log_buf, order_base_2(new_log_buf_len), > >> + new_dict_buf, order_base_2(new_log_buf_len), > >> +

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread lijiang
在 2020年07月02日 17:02, John Ogness 写道: > On 2020-07-02, lijiang wrote: >> About the VMCOREINFO part, I made some tests based on the kernel patch >> v3, the makedumpfile and crash-utility can work as expected with your >> patch(userspace patch), but, unfortunately, the vmcore-dmesg(kexec-tools) >>

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread John Ogness
On 2020-07-02, lijiang wrote: > About the VMCOREINFO part, I made some tests based on the kernel patch > v3, the makedumpfile and crash-utility can work as expected with your > patch(userspace patch), but, unfortunately, the vmcore-dmesg(kexec-tools) > can't correctly read the printk ring buffer

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-02 Thread lijiang
Hi, John Ogness About the VMCOREINFO part, I made some tests based on the kernel patch v3, the makedumpfile and crash-utility can work as expected with your patch(userspace patch), but, unfortunately, the vmcore-dmesg(kexec-tools) can't correctly read the printk ring buffer information, and get

Re: pending output optimization: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-07-01 Thread John Ogness
On 2020-06-25, Petr Mladek wrote: >> --- a/kernel/printk/printk.c >> +++ b/kernel/printk/printk.c >> @@ -2009,9 +2056,9 @@ asmlinkage int vprintk_emit(int facility, int level, >> >> /* This stops the holder of console_sem just where we want him */ >> logbuf_lock_irqsave(flags); >> -

Re: buffer allocation: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-29 Thread John Ogness
On 2020-06-29, Petr Mladek wrote: >> @@ @@ void __init setup_log_buf(int early) >> +prb_init(_rb_dynamic, >> + new_log_buf, order_base_2(new_log_buf_len), >> + new_dict_buf, order_base_2(new_log_buf_len), >> + new_descs, order_base_2(new_descs_count)); > >

Re: syslog size unread: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-29 Thread John Ogness
On 2020-06-25, Petr Mladek wrote: > On Thu 2020-06-18 16:55:19, John Ogness wrote: >> --- a/kernel/printk/printk.c >> +++ b/kernel/printk/printk.c >> @@ -1609,11 +1633,15 @@ int do_syslog(int type, char __user *buf, int len, >> int source) >> break; >> /* Number of chars in the

Re: buffer allocation: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-29 Thread Petr Mladek
On Fri 2020-06-26 17:02:48, John Ogness wrote: > On 2020-06-25, Petr Mladek wrote: > >> --- a/kernel/printk/printk.c > >> +++ b/kernel/printk/printk.c > >> + free = __LOG_BUF_LEN; > >> + prb_for_each_record(0, _rb_static, seq, ) > >> + free -= add_to_rb(_rb_dynamic, ); > >> + > >> +

Re: record_printk_text tricks: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-26 Thread John Ogness
On 2020-06-25, Petr Mladek wrote: >> --- a/kernel/printk/printk.c >> +++ b/kernel/printk/printk.c >> @@ -1344,72 +1304,150 @@ static size_t print_prefix(const struct printk_log >> *msg, bool syslog, >> return len; >> } >> >> -static size_t msg_print_text(const struct printk_log *msg,

Re: buffer allocation: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-26 Thread John Ogness
On 2020-06-25, Petr Mladek wrote: >> --- a/kernel/printk/printk.c >> +++ b/kernel/printk/printk.c >> @@ -1176,11 +1068,46 @@ static void __init set_percpu_data_ready(void) >> __printk_percpu_data_ready = true; >> } >> >> +static unsigned int __init add_to_rb(struct printk_ringbuffer *rb,

Re: truncate dict: was: Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-26 Thread John Ogness
On 2020-06-25, Petr Mladek wrote: >> --- a/kernel/printk/printk.c >> +++ b/kernel/printk/printk.c >> @@ -594,22 +473,26 @@ static u32 msg_used_size(u16 text_len, u16 dict_len, >> u32 *pad_len) >> #define MAX_LOG_TAKE_PART 4 >> static const char trunc_msg[] = ""; >> >> -static u32

Re: record_printk_text tricks: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-25 14:09:46, Petr Mladek wrote: > On Thu 2020-06-18 16:55:19, John Ogness wrote: > > Replace the existing ringbuffer usage and implementation with > > lockless ringbuffer usage. Even though the new ringbuffer does not > > require locking, all existing locking is left in place.

syslog size unread: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-18 16:55:19, John Ogness wrote: > Replace the existing ringbuffer usage and implementation with > lockless ringbuffer usage. Even though the new ringbuffer does not > require locking, all existing locking is left in place. Therefore, > this change is purely replacing the underlining

pending output optimization: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-18 16:55:19, John Ogness wrote: > Replace the existing ringbuffer usage and implementation with > lockless ringbuffer usage. Even though the new ringbuffer does not > require locking, all existing locking is left in place. Therefore, > this change is purely replacing the underlining

record_printk_text tricks: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-18 16:55:19, John Ogness wrote: > Replace the existing ringbuffer usage and implementation with > lockless ringbuffer usage. Even though the new ringbuffer does not > require locking, all existing locking is left in place. Therefore, > this change is purely replacing the underlining

buffer allocation: was: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-18 16:55:19, John Ogness wrote: > Replace the existing ringbuffer usage and implementation with > lockless ringbuffer usage. Even though the new ringbuffer does not > require locking, all existing locking is left in place. Therefore, > this change is purely replacing the underlining

truncate dict: was: Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-25 Thread Petr Mladek
On Thu 2020-06-18 16:55:19, John Ogness wrote: > Replace the existing ringbuffer usage and implementation with > lockless ringbuffer usage. Even though the new ringbuffer does not > require locking, all existing locking is left in place. Therefore, > this change is purely replacing the underlining

Re: [PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-18 Thread kernel test robot
Hi John, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.8-rc1 next-20200618] [cannot apply to pmladek/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-18 Thread John Ogness
Replace the existing ringbuffer usage and implementation with lockless ringbuffer usage. Even though the new ringbuffer does not require locking, all existing locking is left in place. Therefore, this change is purely replacing the underlining ringbuffer. Changes that exist due to the ringbuffer