iovisor / iovisor/bcc

Are BPF maps threadsafe?

Open
#2,490 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
5d 13h
Merged PRs (30d)
3

Description

Are BPF map operations threadsafe?

```
bpf_map.insert()
bpf_map.increment()
bpf_map->field_1 += value_1
```

Documentation on this matter is scarce. I suspect (3) is not atomic, and if so are there workarounds?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the documented behavior of the BPF map operations shown: insert(), increment(), and field_1 += value_1. The documentation is complete when it explains their thread safety and atomicity, and identifies any supported workarounds for non-atomic updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.