[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6c65efac-bead-b29c-750b-0a4c1d216b87@iogearbox.net>
Date: Thu, 26 Mar 2020 00:21:50 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Stanislav Fomichev <sdf@...gle.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Cc: davem@...emloft.net, ast@...nel.org,
Andrii Nakryiko <andriin@...com>
Subject: Re: [PATCH bpf-next v3] libbpf: don't allocate 16M for log buffer by
default
On 3/25/20 8:55 PM, Stanislav Fomichev wrote:
> For each prog/btf load we allocate and free 16 megs of verifier buffer.
> On production systems it doesn't really make sense because the
> programs/btf have gone through extensive testing and (mostly) guaranteed
> to successfully load.
>
> Let's assume successful case by default and skip buffer allocation
> on the first try. If there is an error, start with BPF_LOG_BUF_SIZE
> and double it on each ENOSPC iteration.
>
> v3:
> * Return -ENOMEM when can't allocate log buffer (Andrii Nakryiko)
>
> v2:
> * Don't allocate the buffer at all on the first try (Andrii Nakryiko)
>
> Signed-off-by: Stanislav Fomichev <sdf@...gle.com>
> Acked-by: Andrii Nakryiko <andriin@...com>
Applied, thanks!
Powered by blists - more mailing lists