Re: trace_printk


Quentin Monnet
 

Untrue. All these options can be used (and are used by big companies)
with production kernels. I believe many distributions enable them by
default.

Quentin


2018-03-29 14:34 UTC+0000 ~ Saran Kumar Krishnan <sarankumar.k@...>

Thanks for the clarification.


I assumed enabling the options specified in https://github.com/iovisor/bcc/blob/master/INSTALL.md

rendered the kernel as DEBUG which is unsafe for production use.


Is my assumption untrue?


Regards

Saran

________________________________
From: Quentin Monnet <quentin.monnet@...>
Sent: Thursday, March 29, 2018 9:49 AM
To: Saran Kumar Krishnan
Cc: Y Song; iovisor-dev@...
Subject: Re: [iovisor-dev] trace_printk

Just to make it clear, Yonghong means that *the helper function
bpf_trace_printk()* should be used mostly for debug. eBPF itself can
perfectly be used in production.

If you needed to stream data from eBPF programs to user space in
production applications, the way to go would be to use perf maps and
related helpers. This would provide better performances than
bpf_trace_printk().

Best regards,
Quentin


2018-03-28 13:14 UTC-0700 ~ Y Song via iovisor-dev
<iovisor-dev@...>
No, this can still be used. The warning just tells you this should
mostly be used in debug mode.

On Wed, Mar 28, 2018 at 11:59 AM, Saran Kumar Krishnan via iovisor-dev
<iovisor-dev@...> wrote:
Hi -


When I use bpf_trace_printk - I am getting this NOTICE. Does it mean, that
eBPF shouldn't be used in the production kernel.



Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518]
**********************************************************
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] ** NOTICE NOTICE NOTICE
NOTICE NOTICE NOTICE NOTICE **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467518] **
**
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] ** trace_printk() being
used. Allocating extra memory. **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467519] **
**
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** This means that this
is a DEBUG kernel and it is **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] ** unsafe for production
use. **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467520] **
**
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467521] ** If you see this
message and you are not debugging **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** the kernel, report
this immediately to your vendor! **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] **
**
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467522] ** NOTICE NOTICE NOTICE
NOTICE NOTICE NOTICE NOTICE **
Mar 20 12:26:44 lenovo-e565 kernel: [ 267.467523]
**********************************************************



Regards
Saran

Join iovisor-dev@lists.iovisor.org to automatically receive all group messages.