@@ -222,6 +222,31 @@ If the frame length is larger than rx_copybreak, napi_get_frags()
is used, otherwise netdev_alloc_skb_ip_align() is used, the buffer
content is copied (by CPU) to the SKB, and the buffer is recycled.
+Local Page Cache (LPC)
+======================
+ENA Linux driver allows to reduce lock contention and improve CPU usage by
+allocating RX buffers from a page cache rather than from Linux memory system
+(PCP or buddy allocator). The cache is created and binded per RX queue, and
+pages allocated for the queue are stored in the cache (up to cache maximum
+size).
+
+When enabled, LPC cache size is ENA_LPC_DEFAULT_MULTIPLIER * 1024 (2048 by
+default) pages.
+
+The cache usage for each queue can be monitored using ``ethtool -S`` counters. Where:
+
+- *rx_queue#_lpc_warm_up* - number of pages that were allocated and stored in
+ the cache
+- *rx_queue#_lpc_full* - number of pages that were allocated without using the
+ cache because it didn't have free pages
+- *rx_queue#_lpc_wrong_numa* - number of pages from the cache that belong to a
+ different NUMA node than the CPU which runs the NAPI routine. In this case,
+ the driver would try to allocate a new page from the same NUMA node instead
+
+LPC is disabled when using XDP or when using less than 16 queue pairs. Note that
+cache usage might increase the memory footprint of the driver (depending on the
+traffic).
+
Statistics
==========
The user can obtain ENA device and driver statistics using ethtool.
Add a description for local page cache system to the ENA driver readme file. Signed-off-by: Shay Agroskin <shayagr@amazon.com> --- .../device_drivers/ethernet/amazon/ena.rst | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+)