public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v5 1/2] docs/bpf: Add table to describe LRU properties
@ 2023-04-22 17:20 Joe Stringer
  2023-04-22 17:20 ` [PATCH bpf-next v5 2/2] docs/bpf: Add LRU internals description and graph Joe Stringer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joe Stringer @ 2023-04-22 17:20 UTC (permalink / raw)
  To: bpf
  Cc: linux-doc, linux-kernel, ast, corbet, martin.lau, bagasdotme,
	maxtram95, john.fastabend

Depending on the map type and flags for LRU, different properties are
global or percpu. Add a table to describe these.

Signed-off-by: Joe Stringer <joe@isovalent.com>
---
v5: Use bold rather than verbatim for column header
v4: Initial posting
---
 Documentation/bpf/map_hash.rst | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/bpf/map_hash.rst b/Documentation/bpf/map_hash.rst
index 8669426264c6..1314dfc5e7e1 100644
--- a/Documentation/bpf/map_hash.rst
+++ b/Documentation/bpf/map_hash.rst
@@ -29,7 +29,16 @@ will automatically evict the least recently used entries when the hash
 table reaches capacity. An LRU hash maintains an internal LRU list that
 is used to select elements for eviction. This internal LRU list is
 shared across CPUs but it is possible to request a per CPU LRU list with
-the ``BPF_F_NO_COMMON_LRU`` flag when calling ``bpf_map_create``.
+the ``BPF_F_NO_COMMON_LRU`` flag when calling ``bpf_map_create``.  The
+following table outlines the properties of LRU maps depending on the a
+map type and the flags used to create the map.
+
+======================== ========================= ================================
+Flag                     ``BPF_MAP_TYPE_LRU_HASH`` ``BPF_MAP_TYPE_LRU_PERCPU_HASH``
+======================== ========================= ================================
+**BPF_F_NO_COMMON_LRU**  Per-CPU LRU, global map   Per-CPU LRU, per-cpu map
+**!BPF_F_NO_COMMON_LRU** Global LRU, global map    Global LRU, per-cpu map
+======================== ========================= ================================
 
 Usage
 =====
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-27 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-22 17:20 [PATCH bpf-next v5 1/2] docs/bpf: Add table to describe LRU properties Joe Stringer
2023-04-22 17:20 ` [PATCH bpf-next v5 2/2] docs/bpf: Add LRU internals description and graph Joe Stringer
2023-04-23 14:26   ` John Fastabend
2023-04-23 14:26 ` [PATCH bpf-next v5 1/2] docs/bpf: Add table to describe LRU properties John Fastabend
2023-04-27 12:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox