On Mon, Dec 09, 2019 at 04:42:52AM -0800, Quentin Monnet wrote:<br>
> There is a delay indeed when the locked memory is being reclaimed after a BPF program or map is removed. If I understand correctly it could come from the `call_rcu()` in [`__bpf_put_prog_noref()`](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/bpf/syscall.c?h=v5.4#n1339).<br>
> <br>
> For the record, in bpftool we call `setrlimit()` to work around it and [raise the limit](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8302b9bd31d29f29dd24dd6b1e1e5682c302c11c) prior to running a succession of tests to check what BPF objects are supported by the system.<br>
<br>
Thanks Quentin.<br>
<br>
We could use the same approach in the strace test suite, but unlike<br>
iproute2 and bpftool, strace test suite does not usually have any<br>
privileges to raise its RLIMIT_MEMLOCK above the hard limit<br>
which is set by default to 64K.<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/strace/strace/issues/74?email_source=notifications&email_token=AAFX7DAO4JNJAZUUT3F76J3QX2JTZA5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJJIY#issuecomment-563385507">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFX7DBGNHN23AEV7DV3LCDQX2JTZANCNFSM4FMFBRLA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAFX7DFXDGMXQ4XJTXA5UKDQX2JTZA5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJJIY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/issues/74?email_source=notifications\u0026email_token=AAFX7DAO4JNJAZUUT3F76J3QX2JTZA5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJJIY#issuecomment-563385507",
"url": "https://github.com/strace/strace/issues/74?email_source=notifications\u0026email_token=AAFX7DAO4JNJAZUUT3F76J3QX2JTZA5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKJJIY#issuecomment-563385507",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>