<p>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 <code>call_rcu()</code> in <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/bpf/syscall.c?h=v5.4#n1339" rel="nofollow"><code>__bpf_put_prog_noref()</code></a>.</p>
<p>For the record, in bpftool we call <code>setrlimit()</code> to work around it and <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8302b9bd31d29f29dd24dd6b1e1e5682c302c11c" rel="nofollow">raise the limit</a> prior to running a succession of tests to check what BPF objects are supported by the system.</p>
<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=AAFX7DH2P5D4RRE27OI5GQ3QXY4M3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGJBEXI#issuecomment-563221085">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFX7DGPVRLZHJASAB5SOGDQXY4M3ANCNFSM4FMFBRLA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAFX7DBHIWUXDQH4WILRQILQXY4M3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGJBEXI.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=AAFX7DH2P5D4RRE27OI5GQ3QXY4M3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGJBEXI#issuecomment-563221085",
"url": "https://github.com/strace/strace/issues/74?email_source=notifications\u0026email_token=AAFX7DH2P5D4RRE27OI5GQ3QXY4M3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGJBEXI#issuecomment-563221085",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>