docs/bpf: Add LRU internals description and graph
authorJoe Stringer <joe@isovalent.com>
Sat, 22 Apr 2023 17:20:54 +0000 (10:20 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Apr 2023 12:20:44 +0000 (14:20 +0200)
commit1a986518b8a517637f70cd6d7d494bd0cbbf6145
tree28bf420a8ac005bcd99f3659abd699dcbe3c5327
parentaf0335d2926e1c597c247956cd608b6e8c9d6463
docs/bpf: Add LRU internals description and graph

Extend the bpf hashmap docs to include a brief description of the
internals of the LRU map type (setting appropriate API expectations),
including the original commit message from Martin and a variant on the
graph that I had presented during my Linux Plumbers Conference 2022
talk on "Pressure feedback for LRU map types"[0].

The node names in the dot file correspond roughly to the functions
where the logic for those decisions or steps is defined, to help
curious developers to cross-reference and update this logic if the
details of the LRU implementation ever differ from this description.

  [0] https://lpc.events/event/16/contributions/1368/

Signed-off-by: Joe Stringer <joe@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20230422172054.3355436-2-joe@isovalent.com
Documentation/bpf/map_hash.rst
Documentation/bpf/map_lru_hash_update.dot [new file with mode: 0644]